title: How to use a DLL written in C# in other asp.net project?
body: <p>I have a file named common.cs which contains commonly used functions like this</p>
  
  <pre><code>    public int GetColumnIndexByNameTemplateField(GridViewRow row, string SearchColumnName)
  {
      int columnIndex = 0;
      foreach (DataControlFieldCell cell in row.Cells)
      {
          if (cell.ContainingField is TemplateField)
          {
              if (((TemplateField)cell.ContainingField).HeaderText.Equals(SearchColumnName))
              {
                  break;
              }
          }
          columnIndex++;
      }
      return columnIndex;
  }
  </code></pre>
  
  <p>Now I want to make that common.cs file change into common.dll, I created another class library project in which I copied all the code from common.cs file, added necessary references and built it to generate dll file, now I pasted that dll file from project debug directory into the bin directory of my asp.net project which is already using common.cs but whenever I try to import that dll using.</p>
  
  <pre><code>[DllImport("common.dll")]
  public static extern String NewString(String x);
  </code></pre>
  
  <p>where NewString is another function, I get this error.</p>
  
  <p>Unable to find an entry point named 'NewString' in DLL 'common.dll'.</p>
  
  <p>I have checked already posted questions on stackoverflow as well as other guides on internet that tell how to make and use a dll but I don't know why I am getting this error also most of the guides show dll written in C++ where as my dll is written in C#, they also tell to use __declspec(dllexport) which tells that function is ready to be exported or something like that but I can't use this in C# dll I suppose.</p>
  
  <p>I think its a basic question but this is my first time creating dll in C# so please help me out.</p>
  
  <p>Thanks.</p>