Re: C/C++ typedef in C#



[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

.



Relevant Pages

  • Re: Newbie question about "NEW: Keyword
    ... etc), use the NEW keyword. ... And the method GetFullNameshould be a prototype method, ... The array data structure, encapsulated by the Array ...
    (comp.lang.javascript)
  • Re: array dimensioning
    ... Could someone please review the thread: "Array Declaration Problem" and my ... then with the Preserve keyword you can change only the upper bound of ... In this case, if you try to change either bound of the 1st dimension, ...
    (microsoft.public.excel.programming)
  • Re: Setting ACL File Attributes with C#
    ... I only missed a function to set the DACL on the file, ... > Version 1 of the .net framework does not have built in support for ... > Please do not send email directly to this alias, ... >> We need to set file and directory security rights to specific NT roles, ...
    (microsoft.public.dotnet.security)
  • Re: perl grep problem
    ... > basically the script reads all the data from files in a directory into ... > an array. ... > works fine) and $ARGVis the user input word to search for. ... > inputs the keyword to search for and we loop step 2 as many times as ...
    (comp.lang.perl.misc)
  • Re: Execution speed, Java vs. C#/J#
    ... > variable, a 'dangling' pointer, or an expression that indexes an array ... producing IL-code and calling .NET framework methods. ... there should be no significant difference. ...
    (microsoft.public.dotnet.languages.csharp)