J
jleslie48
Its probably something silly, but I'm trying to make a generic
namespace for my defined types. In this example its an enum that I
want several classes in a different namespace to be able to see.
This is what I wrote:
//++++++++++++++++++++++++++++++++++++++++
namespace MyTypedefs
{
public class MyTypedefsClass
{
public enum indx_type {a, c };
}
}//namespace MyTypedefs
namespace WindowsFormsApplication01
{
using MyTypedefs;
public partial class Form1 : Form
{
MyTypedefs.MyTypedefsClass.indx_type indx;
indx_type indx_bad;
//++++++++++++++++++++++++++++++++++++++++
now two things are bad:
1) can comment out the "using using MyTypedefs;" line and nothing
changes. which brings me to the second problem,
2) the last line "indx_type indx_bad; " is an error message
undefined type.
I was hoping that the using line would allow me to use the indx_type
directly, similar to how a included .h file allows a c programmer to
know about a type that is defined withing the h file.
namespace for my defined types. In this example its an enum that I
want several classes in a different namespace to be able to see.
This is what I wrote:
//++++++++++++++++++++++++++++++++++++++++
namespace MyTypedefs
{
public class MyTypedefsClass
{
public enum indx_type {a, c };
}
}//namespace MyTypedefs
namespace WindowsFormsApplication01
{
using MyTypedefs;
public partial class Form1 : Form
{
MyTypedefs.MyTypedefsClass.indx_type indx;
indx_type indx_bad;
//++++++++++++++++++++++++++++++++++++++++
now two things are bad:
1) can comment out the "using using MyTypedefs;" line and nothing
changes. which brings me to the second problem,
2) the last line "indx_type indx_bad; " is an error message
undefined type.
I was hoping that the using line would allow me to use the indx_type
directly, similar to how a included .h file allows a c programmer to
know about a type that is defined withing the h file.