You would also have to explain "what" the problem might be. If the problem is as broad as "I don't understand them", then the answer will be equally broad. For a general introduction to the topic, see MSDN[^].
In order to use true pointers, you need to execute what is called unsafe code
This means you have to do two things:
1) Turn on unsafe code in your app (it is off by default). This is on the Build tab of your project properties.
2) Put the pointer use into an unsafe block. There is an example on the MSDN page: http://msdn.microsoft.com/en-us/library/chfa2zb8(v=vs.71).aspx[^]
If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.
As others have said, you can use unsafe code. Alternatively, you can often use SafeHandles, GCHandles, GC.AllocHGlobal / GCFreeHGlobal along with IntPtr etc instead to achieve most things without needing to go quite as far as unsafe.
Without knowing the specifics then it is impossible to advise what is the best solution.
I doubt that your real need it to use pointers. Your need is to solve a problem that requires you to use pointers in languages like C and Pascal. That doesn't mean you need to use pointers in other languages.
In C#, every object is implicitly referenced through a "pointer" (which isn't a memory address, but an object reference). Say, to build a directed tree in a brother/son fashion, you declare your "myObject" class defines members "brother" and "son", both of class "myObj". Their values are not stored in the current node; the current node refers to ("has pointers to") the brother and son. There is no syntactical indication of this, because it is always so for class members.
Atomic members such as int and bool do reside in the class object, object members never do. You must be aware of this distinction - e.g. if you use the int member "age" as a method argument (without modifiers), a copy is provided to the method, but if you use "brother" as an argument, a reference ("pointer") is provided, not an object copy.
If you do not want to sent a copy of a single int, but a reference, you can use the Int class, which behaves just like your myObject instances: A reference is passed, not a copy of the value. But note that you don't need to use Int objects for allowing a method to change a parameter; you can add the modifier "ref" (or "out") to it, but you must add "ref"/"out" both in the formal declaration of the method and everywhere it is invoked.
The only time you need to handle pointers in C# is when interacting with unmanaged code, e.g. for a number of Windows system calls that are not directly available in C#. But you should avoid "using" pointers as much as possible: Treat them as opaque handles. Above all: Stay completely away from doing arithmetics on pointers! (Those who know what can and can't be done in that area need not ask questions about pointers in C#... )
Last Visit: 31-Dec-99 18:00 Last Update: 11-Mar-14 0:41