W
Wazir
Hi all,
I have one class in a C# Class Library project and one class in a Windows
Application project. Both are a part of my solution.
This is a skeleton representation of my classes
namespace classlib
{
public class sample
{
public sample(example value)
{
}
public enum example : int
{
One = 1,
Two = 2,
Three = 3,
Four = 4
}
} // end of class
}
My consumer class in the windows application project creates an instance of
the sample class. The windows app references the class library
public class consumer
{
public void testSample() {
classlib.sample s = new
classlib.sample(classlib.sample.example.One);
}
}
When passing the parameter I have to give the whole path to the enum. I am
not able to call the constructor like this: classlib.sample s = new
classlib.sample(example.One);
I suppose the example enum would have the be in some sort of a global class
in the class library. Can anyone help me out here.
Many thanks
Wazir
I have one class in a C# Class Library project and one class in a Windows
Application project. Both are a part of my solution.
This is a skeleton representation of my classes
namespace classlib
{
public class sample
{
public sample(example value)
{
}
public enum example : int
{
One = 1,
Two = 2,
Three = 3,
Four = 4
}
} // end of class
}
My consumer class in the windows application project creates an instance of
the sample class. The windows app references the class library
public class consumer
{
public void testSample() {
classlib.sample s = new
classlib.sample(classlib.sample.example.One);
}
}
When passing the parameter I have to give the whole path to the enum. I am
not able to call the constructor like this: classlib.sample s = new
classlib.sample(example.One);
I suppose the example enum would have the be in some sort of a global class
in the class library. Can anyone help me out here.
Many thanks
Wazir