Usng header file defines in C# Code
i need to create a header (*.h) file with these defines :
#define MY_FIRST_DEFINE 1
#define MY_SECOND_DEFINE 2
#define MY_THIRD_DEFINE 3
and use it in a cs file - C# Code.
How do i include it ?
do i need to write a special code in the header file ?
do i need to write a special code in the C# file ?
thanks.
Re: Usng header file defines in C# Code
:) That's not going to work. You cannot use C++ files in C#. ;) Simply create a cs file with an enumeration:
Code:
public enum Defines
{
MY_FIRST_DEFINE = 1,
MY_SECOND_DEFINE = 2,
MY_THIRD_DEFINE = 3
}
Or you could make it a static class if you want.
Code:
public static class Defines
{
public const int MY_FIRST_DEFINE = 1;
public const int MY_SECOND_DEFINE = 2;
public const int MY_THIRD_DEFINE = 3;
}