Click here to Skip to main content
16,004,901 members
Home / Discussions / C#
   

C#

 
GeneralRe: Basic C# - Object Reference Not Set To Instance of An Object Pin
kayos59213-May-06 13:48
kayos59213-May-06 13:48 
GeneralRe: Basic C# - Object Reference Not Set To Instance of An Object Pin
Office Lineman14-May-06 3:51
Office Lineman14-May-06 3:51 
GeneralRe: Basic C# - Object Reference Not Set To Instance of An Object Pin
alexey N11-May-06 18:29
alexey N11-May-06 18:29 
GeneralRe: Basic C# - Object Reference Not Set To Instance of An Object Pin
kayos59211-May-06 18:31
kayos59211-May-06 18:31 
GeneralRe: Basic C# - Object Reference Not Set To Instance of An Object Pin
Pavel Vladov11-May-06 21:29
Pavel Vladov11-May-06 21:29 
GeneralRe: Basic C# - Object Reference Not Set To Instance of An Object Pin
kayos59212-May-06 3:48
kayos59212-May-06 3:48 
GeneralRe: Basic C# - Object Reference Not Set To Instance of An Object Pin
Pavel Vladov12-May-06 8:07
Pavel Vladov12-May-06 8:07 
AnswerRe: Basic C# - Object Reference Not Set To Instance of An Object Pin
nikeshkumar11-May-06 19:19
nikeshkumar11-May-06 19:19 
hi key,

your code shows you didnt create instance of Patient class,only reference you declared which do not reserve any memory on jeap.simply solution is that
first create instance of Patient class theh use medhods. like this



private void Form1_Load(object sender, System.EventArgs e)
{
Patient PatientData = new Patient();
PatientData.id[0] = 0;
PatientData.Lname[0] = "Smith";
PatientData.Fname[0] = "John";
PatientData.Mname[0] = "Allen";
}

public class Patient
{
public int[] id = new int[5];
public string[] Lname = new string[5];
public string[] Fname = new string[5];
public string[] Mname = new string[5];
}

it will work fine.

nikesh


nikesh
QuestionLoopBack Pin
picasso211-May-06 15:29
picasso211-May-06 15:29 
AnswerRe: LoopBack Pin
led mike11-May-06 15:56
led mike11-May-06 15:56 
GeneralRe: LoopBack Pin
leppie11-May-06 22:06
leppie11-May-06 22:06 
GeneralRe: LoopBack Pin
led mike12-May-06 5:10
led mike12-May-06 5:10 
QuestionRe: LoopBack Pin
Matt Newman11-May-06 19:16
Matt Newman11-May-06 19:16 
AnswerRe: LoopBack Pin
picasso214-May-06 8:57
picasso214-May-06 8:57 
GeneralRe: LoopBack Pin
Matt Newman15-May-06 10:34
Matt Newman15-May-06 10:34 
QuestionSorting of data (item) inside the text file. Pin
jrbvillanueva11-May-06 15:01
jrbvillanueva11-May-06 15:01 
AnswerRe: Sorting of data (item) inside the text file. Pin
led mike11-May-06 15:55
led mike11-May-06 15:55 
GeneralRe: Sorting of data (item) inside the text file. Pin
jrbvillanueva11-May-06 17:14
jrbvillanueva11-May-06 17:14 
QuestionMonitoring internet browsers' current URIs Pin
Domenic Denicola11-May-06 12:06
Domenic Denicola11-May-06 12:06 
GeneralRe: Monitoring internet browsers' current URIs Pin
Guffa11-May-06 12:53
Guffa11-May-06 12:53 
QuestionHow To Remove All Events? Pin
yaniv abobo11-May-06 11:01
yaniv abobo11-May-06 11:01 
AnswerRe: How To Remove All Events? Pin
Graham Nimbley11-May-06 13:13
Graham Nimbley11-May-06 13:13 
GeneralRe: How To Remove All Events? Pin
yaniv abobo11-May-06 21:26
yaniv abobo11-May-06 21:26 
AnswerRe: How To Remove All Events? Pin
engsrini12-May-06 0:48
engsrini12-May-06 0:48 
QuestionHow to encrypt/decrypt emails written in MS outlook 2000/2003 Pin
OmaniProgramer11-May-06 9:56
OmaniProgramer11-May-06 9:56 

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.