using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Assignment11
{
class Dog
{
public void bark()
{
Console.WriteLine("Empty method");
}
public void bark (string agr);
Console.WriteLine ("fido is Barking")
}
class Program
{
static void Main(string[] args)
{
Dog fido = new Dog();
fido.bark();
fido.bark ("fido");
Console.Write("Hit any key to close");
Console.ReadKey(true);
}
}
}
VulpesPosted Oct 23, 2014, 7:04 AM
Lai JianliePosted Oct 22, 2014, 11:14 PM
{
public void bark()
{
Console.WriteLine("Empty method");
}
//you put semicolon after the parameter list
//and you lost a brace in this method
public void bark(string agr)
{
Console.WriteLine("fido is Barking");
}
//you also lost a brace of Dog class
}