asking
please give me a broad explanation on filing and pointer in C#
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
SenthilkumarPosted Apr 23, 2012, 1:59 AM
For more info:
http://msdn.microsoft.com/en-us/library/y31yhkeb(v=vs.80).aspx
http://imrannazar.com/Using-Pointers-in-C
Jignesh TrivediPosted Apr 22, 2012, 11:38 PM
C# supports pointers in a limited extent. A pointer is nothing but a variable that holds the memory address of another type. But in C# pointer can only be declared to hold the memory address of value types and arrays. Unlike reference types, pointer types are not tracked by the default garbage collection mechanism. For the same reason pointers are not allowed to point to a reference type or even to a structure type which contains a reference type.
Declaring a Pointer type
int *myPointer;
you can use pointer using unsafe keyword.
unsafe
{
int x = 10;
int *ptr1 = &x;
Console.WriteLine((int)ptr1);
Console.WriteLine(*ptr1);
}
hope this help.
Satyapriya NayakPosted Apr 22, 2012, 11:16 PM
Please refer the below links
http://imrannazar.com/Using-Pointers-in-C
http://www.codeproject.com/Articles/1453/Getting-unsafe-with-pointers-in-C
Thanks