use #include in c#

  • Thread starter Thread starter Yoavo
  • Start date Start date
Y

Yoavo

Hi,
I am writing an application in c# which needs to read some definitions from
a header file.
Is there a way to "#include" a header file in c# ?

Yoav.
 
Hello, Yoavo!

C# has no header files.
What do you mean by reading definitions?

maybe "using" keyword is what you need?

( http://msdn2.microsoft.com/en-us/library/sf0df423(VS.80).aspx )

You wrote on Tue, 19 Dec 2006 10:49:02 +0200:

Y> Hi,
Y> I am writing an application in c# which needs to read some definitions
Y> from a header file.
Y> Is there a way to "#include" a header file in c# ?

Y> Yoav.


With best regards, Vadym Stetsyak. E-mail: (e-mail address removed)
 
May be you can do it like the winForms designer.

Write 2 files 1st one MyClass.Defs.cs
2nd one MyClass.cs

in both files write

namespace MyNameSpace {
public partial class MyClass {
}
}

in the first file you can define const members of delegeta types or
what you want
in the second file you can implement you code
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top