// Uses DisplayWebAddress method three times
using System;
class DebugSeven1
{
static void Main()
{
DisplayWebAddress;
Console.WriteLine("Shop at Shopper's World");
DisplayWebAddress;
Console.WriteLine("The best bargains from around the world");
DisplayWebAddress;
}
private void DisplayWebAddress()
{
Console.WriteLine("------------------------------");
Console.WriteLine("Visit us on the web at:");
Console.WriteLine("www.shoppersworldbargains.com");
Console.WriteLine("******************************");
}
}
please help me in correcting syntax and logical errors.
Loading
VulpesPosted Oct 9, 2014, 6:43 AM
Munesh SharmaPosted Oct 9, 2014, 3:04 AM
class DebugSeven1
{
static void Main()
{
DisplayWebAddress();
Console.WriteLine("Shop at Shopper's World");
DisplayWebAddress();
Console.WriteLine("The best bargains from around the world");
DisplayWebAddress();
}
private void DisplayWebAddress()
{
Console.WriteLine("------------------------------");
Console.WriteLine("Visit us on the web at:");
Console.WriteLine("www.shoppersworldbargains.com");
Console.WriteLine("******************************");
}
}
you code is fine but problem is that u are not calling that function in correct format .. you call it as
DisplayWebAddress();