Click here to Skip to main content
15,922,533 members
Home / Discussions / C#
   

C#

 
QuestionHow to declare an use a struct containing an array? Pin
scjsb5-Jan-09 5:13
scjsb5-Jan-09 5:13 
AnswerRe: How to declare an use a struct containing an array? Pin
Christian Graus5-Jan-09 5:17
protectorChristian Graus5-Jan-09 5:17 
AnswerRe: How to declare an use a struct containing an array? Pin
moon_stick5-Jan-09 5:25
moon_stick5-Jan-09 5:25 
GeneralRe: How to declare an use a struct containing an array? Pin
Not Active5-Jan-09 5:53
mentorNot Active5-Jan-09 5:53 
GeneralRe: How to declare an use a struct containing an array? Pin
moon_stick5-Jan-09 6:25
moon_stick5-Jan-09 6:25 
GeneralRe: How to declare an use a struct containing an array? Pin
Not Active5-Jan-09 6:52
mentorNot Active5-Jan-09 6:52 
AnswerRe: How to declare an use a struct containing an array? [modified] Pin
#realJSOP5-Jan-09 5:36
professional#realJSOP5-Jan-09 5:36 
AnswerRe: How to declare an use a struct containing an array? Pin
Russell Jones5-Jan-09 5:42
Russell Jones5-Jan-09 5:42 
i think the fixed keyword might help you

unsafe public struct ChangeRec

{
public DateTime LastTimeStamp;
public int last ;
public fixed int mode[10] ; // I want an integer array of values
}
}
The big problem here is that you'll have to allow unsafe code within your project so it's probably not the best plan unless you're planning to use interop.

i'd be tempted to implement the thing as a class and create getMode(int i) and setMode(int i) methods.

Russ
AnswerRe: How to declare an use a struct containing an array? Pin
Dragonfly_Lee5-Jan-09 17:39
Dragonfly_Lee5-Jan-09 17:39 
AnswerRe: How to declare an use a struct containing an array? Pin
Jon Rista6-Jan-09 10:41
Jon Rista6-Jan-09 10:41 
GeneralRe: How to declare an use a struct containing an array? Pin
scjsb7-Jan-09 1:45
scjsb7-Jan-09 1:45 
Questioncan you get rid of data members in a class after inheritance? Pin
bfis1081375-Jan-09 4:38
bfis1081375-Jan-09 4:38 
AnswerRe: can you get rid of data members in a class after inheritance? Pin
Christian Graus5-Jan-09 5:14
protectorChristian Graus5-Jan-09 5:14 
Questionhow to use XPath to parse the XML file? Pin
George_George5-Jan-09 3:18
George_George5-Jan-09 3:18 
AnswerRe: how to use XPath to parse the XML file? Pin
Le centriste5-Jan-09 3:22
Le centriste5-Jan-09 3:22 
GeneralRe: how to use XPath to parse the XML file? Pin
George_George5-Jan-09 3:34
George_George5-Jan-09 3:34 
GeneralRe: how to use XPath to parse the XML file? Pin
Le centriste5-Jan-09 3:55
Le centriste5-Jan-09 3:55 
GeneralRe: how to use XPath to parse the XML file? Pin
George_George5-Jan-09 22:33
George_George5-Jan-09 22:33 
GeneralRe: how to use XPath to parse the XML file? Pin
Abhijit Jana5-Jan-09 4:06
professionalAbhijit Jana5-Jan-09 4:06 
GeneralRe: how to use XPath to parse the XML file? Pin
George_George5-Jan-09 22:34
George_George5-Jan-09 22:34 
GeneralRe: how to use XPath to parse the XML file? Pin
led mike5-Jan-09 5:05
led mike5-Jan-09 5:05 
GeneralRe: how to use XPath to parse the XML file? Pin
George_George5-Jan-09 22:34
George_George5-Jan-09 22:34 
AnswerRe: how to use XPath to parse the XML file? Pin
Abhijit Jana5-Jan-09 4:03
professionalAbhijit Jana5-Jan-09 4:03 
GeneralRe: how to use XPath to parse the XML file? Pin
George_George5-Jan-09 22:35
George_George5-Jan-09 22:35 
GeneralRe: how to use XPath to parse the XML file? Pin
Abhijit Jana6-Jan-09 0:53
professionalAbhijit Jana6-Jan-09 0:53 

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.