|
-
Nov 1st, 2002, 06:02 AM
#1
Thread Starter
Lively Member
C to C#
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!
-
Nov 1st, 2002, 06:59 AM
#2
yay gay
´things in C# doesnt work much the way they work in c...here there are not DECLARE's but using's;
-
Nov 1st, 2002, 07:23 AM
#3
Thread Starter
Lively Member
´things in C# doesnt work much the way they work in c...here there are not DECLARE's but using's;
You're right!
I would mean #define, not #declare 
Some suggestions now? 
Thanks
-
Nov 1st, 2002, 08:00 PM
#4
Frenzied Member
#define = const in C# more or less
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;
Hope that helped.
Dont gain the world and lose your soul
-
Nov 2nd, 2002, 03:17 AM
#5
Thread Starter
Lively Member
Code:
//defining alias for data types
using BigInt = System.Int64;
//using BigInt
BigInt myInt = 452652;
This is good.
Code:
//C
#define PI 3.14
//C#
const PI = 3.14
This doesn't do for me 
think this:
Code:
#define dec_i public int
dec_i myfunc(){...}
Yes, something good, thanx
P.S.: some ideas about the struct problem int the initial post?
-
Nov 2nd, 2002, 08:24 AM
#6
yay gay
string const String = "hi";
-
Nov 2nd, 2002, 08:30 AM
#7
Thread Starter
Lively Member
string const String = "hi";
why this should help me?
cya
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|