Click here to Skip to main content
15,921,905 members
Home / Discussions / C#
   

C#

 
QuestionCSV File Pin
nhss17-Sep-08 2:33
nhss17-Sep-08 2:33 
AnswerRe: CSV File Pin
J4amieC17-Sep-08 2:38
J4amieC17-Sep-08 2:38 
JokeRe: CSV File Pin
Giorgi Dalakishvili17-Sep-08 2:51
mentorGiorgi Dalakishvili17-Sep-08 2:51 
GeneralRe: CSV File Pin
Scott Dorman17-Sep-08 3:09
professionalScott Dorman17-Sep-08 3:09 
GeneralRe: CSV File Pin
Muammar©17-Sep-08 3:20
Muammar©17-Sep-08 3:20 
GeneralRe: CSV File Pin
Ashfield17-Sep-08 3:40
Ashfield17-Sep-08 3:40 
AnswerRe: CSV File Pin
Mycroft Holmes17-Sep-08 20:00
professionalMycroft Holmes17-Sep-08 20:00 
QuestionHelp with unsafe code ( array of pointer to a stucture) [modified] Pin
Preetham.N17-Sep-08 2:24
Preetham.N17-Sep-08 2:24 
Hi,
Need some help regarding unsafe code.

Am trying to get create an array of pointer to a struct, and not getting through with it.

here is a sampe code

public struct RoomDef
{
public ushort Id;
public string Name;
public string Status;
public string Location;

}


Within a function i have coded the following.

RoomDef* []nee = new RoomDef();

unsafe
{
testPtr = new RoomDef();

nee[1] = & testPtr;

}
This is just a snippet of the code and there are no Syntax errors anywhere. But while I compile it gives me an error stating "Cannot take the address of, get the size of, or declare a pointer to a managed type"

Have tried using the Fixed statement as well, still no go.
I can get the address of the individual members of the structure. But not the structure itself.

Any help will be appreciated. Cry | :((

modified on Wednesday, September 17, 2008 8:51 AM

AnswerRe: Help with unsafe code ( array of pointer to a stucture) Pin
Alan Balkany17-Sep-08 3:23
Alan Balkany17-Sep-08 3:23 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Preetham.N17-Sep-08 3:30
Preetham.N17-Sep-08 3:30 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Guffa17-Sep-08 3:32
Guffa17-Sep-08 3:32 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Alan Balkany17-Sep-08 3:35
Alan Balkany17-Sep-08 3:35 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Preetham.N17-Sep-08 3:42
Preetham.N17-Sep-08 3:42 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Alan Balkany17-Sep-08 3:45
Alan Balkany17-Sep-08 3:45 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Preetham.N17-Sep-08 3:47
Preetham.N17-Sep-08 3:47 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Alan Balkany17-Sep-08 3:58
Alan Balkany17-Sep-08 3:58 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Preetham.N17-Sep-08 4:06
Preetham.N17-Sep-08 4:06 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Alan Balkany17-Sep-08 4:38
Alan Balkany17-Sep-08 4:38 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Guffa17-Sep-08 8:52
Guffa17-Sep-08 8:52 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Alan Balkany18-Sep-08 3:52
Alan Balkany18-Sep-08 3:52 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Alan Balkany17-Sep-08 4:04
Alan Balkany17-Sep-08 4:04 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) [modified] Pin
Guffa17-Sep-08 8:46
Guffa17-Sep-08 8:46 
AnswerRe: Help with unsafe code ( array of pointer to a stucture) Pin
Guffa17-Sep-08 3:25
Guffa17-Sep-08 3:25 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Preetham.N17-Sep-08 3:33
Preetham.N17-Sep-08 3:33 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Guffa17-Sep-08 8:40
Guffa17-Sep-08 8:40 

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.