IDE: VS 2010, C# .net,
I have two win projects in 1 solution,
ProjA, and ProjB
now ProjA contains classA.cs
namespace ProjA
{
class ClassA
{
public static int aValue = 5;
}
}
same way ProjB contains ClassB.cs
namespace ProjB
{
public class ClassB
{
public static int bValue = 10;
}
}
and here is FormA.cs
using System;
using System.Windows.Forms;
using ProjB;
namespace ProjA
{
public partial class FormA : Form
{
public FormA()
{
InitializeComponent();
}
private void FormA_Load(object sender, EventArgs e)
{
int va = ProjB.ClassB.bValue;; //Here getting error.???
}
}
}
Error : Cannot resolve symbol ProjB
Hint: This Problem Is related to namespace, I am trying to access ClassB which is in ProjB from FormA which is in ProjA, Here ProjA and ProjB are the 2 winforms project in Same solution
---xxxx----------- THis problem has been solved.
but now I want to access ClassA.cs in FormB.cs (just reverse of above problem),
when I tried same way ProjB(RighClick) -> Add reference -> ProjName(Tab) ProjA(Click)
The new problem I am facing is its saying unable to add it will create circular dependency, Please suggest How to solve this issue.
I want to access ClassA.cs in ProjB->FormB.cs here FormB is in ProjB