Re: Pointers??

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"Chad Z. Hower aka Kudzu" <cpub@xxxxxxxxx> schrieb:
does C# has pointers?

Not really. .NET doesnt have pointers per se. You can simulate them, or in some cases use
unmanaged code, but in effect .NET does not have pointers, and I for one am glad to see them
finally gone. Pointers have no place in business code.

C# actually supports pointers. However, you must place the code in an 'unsafe' block.


--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


.



Relevant Pages

  • Re: Passing pointers to managed C# code..question.
    ... public static extern void ReturnString(byte buffer[], ... Passing pointers around in managed code is not a great idea. ... structure to the unmanaged code and have the unmanaged code fill it with the ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: Pointers??
    ... >> unmanaged code, but in effect .NET does not have pointers, and I for ... > C# actually supports pointers. ... I should have added unsafe as well. ... Prev by Date: ...
    (microsoft.public.dotnet.languages.vb)
  • Re: C# access to C DLL
    ... >> I'm doing this via an outer DLL that wraps the old C DLL in an unmanaged ... >My guess is that you are passing un-pinned pointers to unmanaged code. ... your comment about pinning pointers may well be the main problem. ... Any recommended references that address this directly? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: C# access to C DLL
    ... >> I'm doing this via an outer DLL that wraps the old C DLL in an unmanaged ... >My guess is that you are passing un-pinned pointers to unmanaged code. ... your comment about pinning pointers may well be the main problem. ... Any recommended references that address this directly? ...
    (microsoft.public.dotnet.framework.interop)
  • Re: VB vs C# vs C++ vs J#
    ... Byte pointers etc are so handy. ... MS keeps putting us in the child corner this way. ... > I've never needed to use unmanaged code. ...
    (microsoft.public.dotnet.framework.aspnet)