I have two same project in which I have two classes under same namespace in one project. In the second project I have added reference to that project and have specified using statement in second project to use namespace (classes under that) of first project.
The problem is it allows me to use 1 class but doesn't allow me to use second class.
?????Why????
Here's the code:
Project 1
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace LibraryProject
{
public class test
{
public static string ErrorMessage = "";
public test(string code)
{
ErrorMessage = code;
}
}
public class FirstClass
{
public static string ErrorMessage = "";
public RFIDHW(string code)
{
ErrorMessage = code;
}
}
}
Second Project
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LibraryProject;
namespace Engine
{
/*
* Connect engine logic with back end DB and other library
*/
public class BackEnd
{
//Return tag list from the connected reader as List<Tag>
public string GetMessage()
{
FirstClass fc = new FirstClass(); //OK no problem
test tt = new test(); // Error message
}//End of GatTagList method
}//End of BackEnd class
}//End of namespace
Error message that I am getting is
The type or namespace name "test" could not found (are you missing a using directive or an assembly reference?).
I have added reference to second project in first project.
I have tried same mechanism in new solution just by taking that piece of code and it worked. (unfortunately I can't move by whole project so have to fix this.)
Please help
Thanks a lot in advance