title: Inconsistent Accessibility: Parameter type is less accessible than method with WCF MEX
body: <p>I Am working on an assignment and I get this error: </p>
  
  <blockquote>
    <p>Error 1   Inconsistent accessibility: parameter type 'MexWcfService.MyComplex' is less accessible than method 'MexWcfService.Calculator.complex_sum(MexWcfService.MyComplex, MexWcfService.MyComplex)'    E:\North Central College\CSC615\lab8\MexWcfService\MexWcfService\Program.cs 75  26  MexWcfService</p>
  </blockquote>
  
  <p>Below is my code. My issue occurs inside the interface implementation class at ..public MyComplex complex_sum(MyComplex a, MyComplex b)...</p>
  
  <p>Can some one help me out here. I am pretty new to C# let alone WCF with Metadata Exchange Endpoints. Any pointers would be greatly appreciated.</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.ServiceModel;
  using System.Runtime.Serialization;
  using System.ServiceModel.Description;
  
  namespace MexWcfService
  {
      [DataContract]
      class MyComplex
      {
          int real;
          int im;
          public MyComplex(int real, int im)
          {
              Real = real;
              Im = im;
          }
  
          [DataMember]
          public int Real
          {
              get { return real; }
              set { real = value; }
          }
          [DataMember]
          public int Im
          {
              get { return im; }
              set { im = value; }
          }
  
      }
      [ServiceContract]
      interface ICalculator
      {
          [OperationContract]
          int mult(int a, int b);
  
          [OperationContract]
          List&lt;int&gt; fib(int n);
  
          [OperationContract]
          MyComplex complex_sum(MyComplex a, MyComplex b);
      }
  
      public class Calculator : ICalculator
      {
  
          public int mult(int a, int b)
          {
              int total = (a * b);
              return total;
          }
          public List&lt;int&gt; fib(int n)
          {
              List&lt;int&gt; list = new List&lt;int&gt;();
              for (int i = 0; i &lt; n; i++)
              {
                  int a = 0;
                  int b = 1;
                  for (int q = 0; q &lt; i; q++)
                  {
                      int temp = a;
                      a = b;
                      b = temp + b;
                  }
                  list.Add(a);
              }
  
              return list;
          }
          public MyComplex complex_sum(MyComplex a, MyComplex b)
          {
              int real = (a.Real + b.Real);
              int im = (a.Im + b.Im);
  
              MyComplex complex = new MyComplex(real, im);
              return complex;
          }
  
      }
  
      class Program
      {
          static void Main(string[] args)
          {
              ServiceHost host = new ServiceHost(typeof(Calculator), new Uri("http://localhost:50000/Math"));
              host.AddServiceEndpoint(typeof(Calculator), new BasicHttpBinding(), "mult");
              ServiceMetadataBehavior bhv = new ServiceMetadataBehavior();
              bhv.HttpGetEnabled = true;
              host.Description.Behaviors.Add(bhv);
              host.Open();
              Console.ReadLine();
  
  
          }
      }
  }
  </code></pre>