Click here to Skip to main content
15,891,976 members
Home / Discussions / C#
   

C#

 
GeneralRe: use pointers in c# Pin
leppie16-Aug-03 10:41
leppie16-Aug-03 10:41 
GeneralRe: use pointers in c# Pin
Ista16-Aug-03 12:06
Ista16-Aug-03 12:06 
GeneralRe: use pointers in c# Pin
J. Dunlap16-Aug-03 12:23
J. Dunlap16-Aug-03 12:23 
GeneralRe: use pointers in c# Pin
Ista16-Aug-03 15:37
Ista16-Aug-03 15:37 
GeneralRe: use pointers in c# Pin
J. Dunlap16-Aug-03 16:51
J. Dunlap16-Aug-03 16:51 
GeneralRe: use pointers in c# Pin
Ista16-Aug-03 15:49
Ista16-Aug-03 15:49 
GeneralRe: use pointers in c# Pin
Nish Nishant16-Aug-03 16:55
sitebuilderNish Nishant16-Aug-03 16:55 
GeneralRe: use pointers in c# Pin
J. Dunlap16-Aug-03 16:58
J. Dunlap16-Aug-03 16:58 
Well, if you really want to use pointers, you can do so in exactly the same way you would do it in C++, only when you declare a variable, you will want to add the fixed keyword to the variable declaration, to keep GC from moving the memory while you're still using it.

A method that uses pointers must have the unsafe keyword, or else the code must be in an unsafe block:
public unsafe void Foo()
{
  //'unsafe' code here
}

...OR...
unsafe
{
  //'unsafe' code here
}


You also must check the "allow unsafe code" option in project options, or compile with the /unsafe compiler option.


"Blessed are the peacemakers, for they shall be called sons of God." - Jesus

"You must be the change you wish to see in the world." - Mahatma Gandhi







GeneralRe: use pointers in c# Pin
Ista16-Aug-03 16:59
Ista16-Aug-03 16:59 
GeneralRe: use pointers in c# Pin
Nish Nishant16-Aug-03 16:53
sitebuilderNish Nishant16-Aug-03 16:53 
GeneralRe: use pointers in c# Pin
Ista16-Aug-03 16:55
Ista16-Aug-03 16:55 
GeneralRe: use pointers in c# Pin
Nish Nishant16-Aug-03 17:01
sitebuilderNish Nishant16-Aug-03 17:01 
GeneralRe: use pointers in c# Pin
Burt Harris16-Aug-03 17:28
Burt Harris16-Aug-03 17:28 
GeneralRe: use pointers in c# Pin
Ista16-Aug-03 18:38
Ista16-Aug-03 18:38 
GeneralRe: use pointers in c# Pin
J. Dunlap16-Aug-03 19:08
J. Dunlap16-Aug-03 19:08 
GeneralRe: use pointers in c# Pin
Ista16-Aug-03 19:09
Ista16-Aug-03 19:09 
GeneralRe: use pointers in c# Pin
J. Dunlap16-Aug-03 19:12
J. Dunlap16-Aug-03 19:12 
GeneralRe: use pointers in c# Pin
Ista16-Aug-03 19:14
Ista16-Aug-03 19:14 
GeneralJFrame in C# Pin
User 53137816-Aug-03 3:36
User 53137816-Aug-03 3:36 
GeneralRe: JFrame in C# Pin
Ista16-Aug-03 4:16
Ista16-Aug-03 4:16 
Generalthe Form like Taskbar Pin
horsewww16-Aug-03 2:44
horsewww16-Aug-03 2:44 
GeneralRe: the Form like Taskbar Pin
apferreira16-Aug-03 3:06
apferreira16-Aug-03 3:06 
QuestionHow to convert from .DOC to .PDF, please help me .......... Pin
Atif Bashir16-Aug-03 2:22
Atif Bashir16-Aug-03 2:22 
AnswerRe: How to convert from .DOC to .PDF, please help me .......... Pin
Ista16-Aug-03 3:20
Ista16-Aug-03 3:20 
AnswerRe: How to convert from .DOC to .PDF, please help me .......... Pin
leppie16-Aug-03 4:31
leppie16-Aug-03 4:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.