Why won't this code work?
using
System;using
System.Windows.Forms;namespace
Practice{
class Practice { public static void Main(){
// declare and assign a string variable called human string human; human = "Walking & talking life"; // declare and assign an int variable called mind int mind; mind = 100; // Print the value of the variables to the console Console.WriteLine(mind); Console.WriteLine(human);}
}
class Continued { public static void notMain(){
MessageBox.Show(human); MessageBox.Show(mind);}
}
}
ahmed aliPosted Apr 18, 2006, 5:22 PM
u can try in this manner the inharitance
System;using
using
System.Windows.Forms;namespace
Practice{
class Practice{
// declare and assign a string variable called human public string human; public int mind; public Practice(){
human =
"Walking & talking life";
// declare and assign an int variable called mindmind = 100;
// Print the value of the variables to the console Console.WriteLine(mind); Console.WriteLine(human);}
}
class Continue:Practice{
public static void Main(){
Practice a = new Practice(); MessageBox.Show(a.human);}
}
}