Someone could tell me how to convert the #declare statement in C#?
And how can I define an alias for data types?
And this what does it mean? What's the :1 and :2?
struct MyStruct
{
uint member_a : 1;
uint member_b : 2;
}
Thank you!
Printable View
Someone could tell me how to convert the #declare statement in C#?
And how can I define an alias for data types?
And this what does it mean? What's the :1 and :2?
struct MyStruct
{
uint member_a : 1;
uint member_b : 2;
}
Thank you!
´things in C# doesnt work much the way they work in c...here there are not DECLARE's but using's;
You're right!Quote:
´things in C# doesnt work much the way they work in c...here there are not DECLARE's but using's;
I would mean #define, not #declare :)
Some suggestions now? :)
Thanks
#define = const in C# more or less
Hope that helped.Code:
//C
#define PI 3.14
//C#
const PI = 3.14
//defining alias for data types
using BigInt = System.Int64;
//using BigInt
BigInt myInt = 452652;
This is good.Quote:
Code://defining alias for data types
using BigInt = System.Int64;
//using BigInt
BigInt myInt = 452652;
This doesn't do for me :(Quote:
Code://C
#define PI 3.14
//C#
const PI = 3.14
think this:
Code:#define dec_i public int
dec_i myfunc(){...}
Yes, something good, thanxQuote:
Hope that helped.
P.S.: some ideas about the struct problem int the initial post?
string const String = "hi";
:confused: :confused:Quote:
string const String = "hi";
why this should help me?
cya