Re: C/C++ typedef in C#
- From: windywinter <wojciech.gebczyk@xxxxxxxxx>
- Date: Mon, 06 Aug 2007 02:54:59 -0700
[cut]
1. If typedef in C is shortcut for further usage of "<name of type>"
instead of "struct <name of type>" then there is no such need (even
it's forbidden) in C# to qualify it.
2. in some situation typedef in C# can be done using "using" keyword
it makes an alias for any type name ONLY locally to file where is has
been defined (this is type name collision resolving mechanism)
3. if you want keep large base class library of .NET Framework and
keep power of C++ use managed extensions of C++ so called "standard" C+
+/CLI. You can mix managed and unmanaged code.
4. When porting please remember that .NET Framework is single class
inheritance language.
5. structs has been designed for some specific scenarios. For example
array of value objects is fully initialized after creaton of array it
self. That's why c# prohibits of parameterless constructor.
Regards,
Wojciech Gebczyk
.
- References:
- C/C++ typedef in C#
- From: artexercise@xxxxxxxxx
- Re: C/C++ typedef in C#
- From: Bongo Bill
- Re: C/C++ typedef in C#
- From: artexercise@xxxxxxxxx
- Re: C/C++ typedef in C#
- From: Gerry Quinn
- C/C++ typedef in C#
- Prev by Date: Re: A roguelike programming contest
- Next by Date: Re: perhaps a different approach to RL
- Previous by thread: Re: C/C++ typedef in C#
- Next by thread: Re: What is fun in roguelikes (again)
- Index(es):
Relevant Pages
|