Click here to Skip to main content
15,906,467 members
Home / Discussions / C#
   

C#

 
Questionredirecting page in asp.net Pin
inaureen23-Jan-06 20:24
inaureen23-Jan-06 20:24 
AnswerRe: redirecting page in asp.net Pin
Garry Stewart23-Jan-06 20:53
Garry Stewart23-Jan-06 20:53 
GeneralRe: redirecting page in asp.net Pin
Guffa23-Jan-06 21:48
Guffa23-Jan-06 21:48 
GeneralRe: redirecting page in asp.net Pin
inaureen23-Jan-06 22:01
inaureen23-Jan-06 22:01 
QuestionTo Constantly ping the system. Pin
Venkat_8323-Jan-06 18:36
Venkat_8323-Jan-06 18:36 
AnswerRe: To Constantly ping the system. Pin
AB777124-Jan-06 0:34
AB777124-Jan-06 0:34 
AnswerRe: To Constantly ping the system. Pin
mitooki24-Jan-06 1:30
mitooki24-Jan-06 1:30 
QuestionConvert a 2003 project to a 2005 project Pin
NewbieDude23-Jan-06 18:16
NewbieDude23-Jan-06 18:16 
AnswerRe: Convert a 2003 project to a 2005 project Pin
M@dHatter23-Jan-06 18:33
M@dHatter23-Jan-06 18:33 
GeneralRe: Convert a 2003 project to a 2005 project Pin
NewbieDude23-Jan-06 18:39
NewbieDude23-Jan-06 18:39 
QuestionCan't make array class data shown in a label Pin
Albert8323-Jan-06 17:57
Albert8323-Jan-06 17:57 
AnswerRe: Can't make array class data shown in a label Pin
AB777123-Jan-06 19:36
AB777123-Jan-06 19:36 
GeneralRe: Can't make array class data shown in a label Pin
Albert8324-Jan-06 9:40
Albert8324-Jan-06 9:40 
GeneralRe: Can't make array class data shown in a label Pin
AB777124-Jan-06 16:58
AB777124-Jan-06 16:58 
GeneralRe: Can't make array class data shown in a label Pin
Albert8324-Jan-06 20:04
Albert8324-Jan-06 20:04 
GeneralRe: Can't make array class data shown in a label Pin
AB777124-Jan-06 20:54
AB777124-Jan-06 20:54 
GeneralRe: Can't make array class data shown in a label Pin
Guffa23-Jan-06 20:41
Guffa23-Jan-06 20:41 
GeneralRe: Can't make array class data shown in a label Pin
Albert8324-Jan-06 9:41
Albert8324-Jan-06 9:41 
AnswerRe: Can't make array class data shown in a label Pin
Garry Stewart23-Jan-06 21:21
Garry Stewart23-Jan-06 21:21 
GeneralRe: Can't make array class data shown in a label Pin
Albert8324-Jan-06 9:51
Albert8324-Jan-06 9:51 
GeneralRe: Can't make array class data shown in a label Pin
Garry Stewart24-Jan-06 12:54
Garry Stewart24-Jan-06 12:54 
GeneralRe: Can't make array class data shown in a label Pin
Albert8324-Jan-06 19:32
Albert8324-Jan-06 19:32 
I tried to implement your suggestion as follows, and got this error:
An unhandled exception of type 'System.NullReferenceException' occurred in Unknown Module.
Additional information: Object reference not set to an instance of an object

Do you know why? My form is called Person. Is that the problem?

Thank you.

private void Person_Load(object sender, System.EventArgs e)
{
this.label1.Text = "";
Person[] person = new Person[5];

person[0] = new Person(22, 5.6, 120, "Chase", 5671234, 2000);
person[0].printWindowsData();
#region
Person[] athlete = new Athlete[3];



athlete[1] = new Athlete("Martial Arts");
athlete[1].FirstName = "Kim";
athlete[1].LastName = "Chung";
athlete[1].Age = 21;
athlete[1].Height1 = 5.7;
athlete[1].Weight = 130;
athlete[1].BankName = "Citi";
athlete[1].BankAccount = 212312;
athlete[1].Balance = 300;

;
#endregion

for (int i = 0; i < athlete.Length; i++)
{
label1.Text += athlete[i].ToString();
//athlete[i].printWindowsData();
}
}
class TestClasses
{
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
Person person = new Person();

Application.Run(person);
//person.printWindowsData();


// Console.ReadLine();
}
}
GeneralPlease disregard the previous exception in the previous message Pin
Albert8324-Jan-06 20:01
Albert8324-Jan-06 20:01 
GeneralRe: Please disregard the previous exception in the previous message Pin
Garry Stewart24-Jan-06 21:07
Garry Stewart24-Jan-06 21:07 
GeneralRe: Please disregard the previous exception in the previous message Pin
Albert8325-Jan-06 15:11
Albert8325-Jan-06 15:11 

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.