Calling a Simple Method
Page 1 of 1
Calling a Simple Method
class Listing6_1
{
public static void Main()
{
Listing6_1 MyObject;
MyObject = new Listing6_1();
MyObject.CallMethod();
}
void CallMethod()
{
System.Console.WriteLine("Hello from CallMethod()!");
}
}
{
public static void Main()
{
Listing6_1 MyObject;
MyObject = new Listing6_1();
MyObject.CallMethod();
}
void CallMethod()
{
System.Console.WriteLine("Hello from CallMethod()!");
}
}
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|