Click here to Skip to main content
15,917,964 members
Home / Discussions / C#
   

C#

 
Question[2.0] a few read/writeprocessmemory questions Pin
games guru5-Jul-07 18:56
games guru5-Jul-07 18:56 
AnswerRe: [2.0] a few read/writeprocessmemory questions Pin
games guru6-Jul-07 3:36
games guru6-Jul-07 3:36 
QuestionHow to use arrays as properties of a class? Pin
dnahelix5-Jul-07 18:16
dnahelix5-Jul-07 18:16 
AnswerRe: How to use arrays as properties of a class? Pin
Leslie Sanford5-Jul-07 18:49
Leslie Sanford5-Jul-07 18:49 
AnswerRe: How to use arrays as properties of a class? Pin
andre_swnpl5-Jul-07 18:54
andre_swnpl5-Jul-07 18:54 
AnswerRe: How to use arrays as properties of a class? Pin
Nouman Bhatti5-Jul-07 20:02
Nouman Bhatti5-Jul-07 20:02 
GeneralThanks a million for your kind help Pin
dnahelix5-Jul-07 20:19
dnahelix5-Jul-07 20:19 
AnswerRe: How to use arrays as properties of a class? Pin
Luc Pattyn6-Jul-07 0:37
sitebuilderLuc Pattyn6-Jul-07 0:37 
Hi,


dnahelix wrote:
public string LabValues
{
get { return m_labValues; }
set { m_labValues = value; }
}


If you want the array m_labValues as a property, you must include the [] in its type:
public string[] LabValues {...}

That way your statements
patient.LabValues[0]="B.P is 120,80";
patient.LabValues[1]="Blood Sugar is 160";
are OK

If there is only one string array to expose (make publicly available) you could work
with an indexor, as others already told you; but for more than one array, that becomes
difficult since an indexor always uses the class name (in the ouside world) and this
(within the class intself), so the only way to differentiate is by the type of the index
variable, which does not have to be an int at all (it could be a string, or whatever
you like), but would be an int if it really stands for an index in an array.

Smile | :)



Questionhow to reuse combox Pin
lockepeak5-Jul-07 18:01
lockepeak5-Jul-07 18:01 
AnswerRe: how to reuse combox [modified] Pin
Martin#5-Jul-07 19:48
Martin#5-Jul-07 19:48 
AnswerRe: how to reuse combox Pin
Nouman Bhatti5-Jul-07 20:03
Nouman Bhatti5-Jul-07 20:03 
QuestionDetermine Collection Type at run time Pin
xdavidx5-Jul-07 16:15
xdavidx5-Jul-07 16:15 
AnswerRe: Determine Collection Type at run time Pin
Christian Graus5-Jul-07 16:16
protectorChristian Graus5-Jul-07 16:16 
GeneralRe: Determine Collection Type at run time Pin
xdavidx5-Jul-07 16:21
xdavidx5-Jul-07 16:21 
GeneralRe: Determine Collection Type at run time Pin
Vikram A Punathambekar5-Jul-07 17:51
Vikram A Punathambekar5-Jul-07 17:51 
QuestionMemory Debugging Tools Pin
vineas5-Jul-07 14:27
vineas5-Jul-07 14:27 
Questioncrystal report problem Pin
rmedo5-Jul-07 12:20
rmedo5-Jul-07 12:20 
QuestionDecrypt but not Encrypt Pin
linal5-Jul-07 11:06
linal5-Jul-07 11:06 
AnswerRe: Decrypt but not Encrypt Pin
Nicholas Cardi5-Jul-07 11:33
Nicholas Cardi5-Jul-07 11:33 
AnswerRe: Decrypt but not Encrypt Pin
dino20945-Jul-07 13:15
dino20945-Jul-07 13:15 
GeneralRe: Decrypt but not Encrypt Pin
linal5-Jul-07 13:36
linal5-Jul-07 13:36 
GeneralRe: Decrypt but not Encrypt Pin
dino20946-Jul-07 7:50
dino20946-Jul-07 7:50 
GeneralRe: Decrypt but not Encrypt Pin
linal6-Jul-07 7:56
linal6-Jul-07 7:56 
GeneralRe: Decrypt but not Encrypt Pin
dino20946-Jul-07 9:04
dino20946-Jul-07 9:04 
GeneralRe: Decrypt but not Encrypt Pin
mav.northwind6-Jul-07 9:06
mav.northwind6-Jul-07 9:06 

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.