Answer the question
In order to leave comments, you need to log in
How do namespaces work in C#?
Hello.
Namespace question.
for example the structure is:
using System;
namespace Life
{
class CommonFeatures
{
//public void Main(){}
public static void sayHello()
{
Console.WriteLine("I'm a creature...");
}
}
////////////////////////////
namespace Peoples
{
class Man
{
// public void Main() {}
public static void sayHello()
{
Console.WriteLine("Hello...");
}
}
}
////////////////////////////
namespace Animals
{
public class dog
{
public static void Main()
{
Life.Peoples.Man.sayHello();
Life.CommonFeatures.sayHello();
sayHello();
}
public static void sayHello()
{
Console.WriteLine("Gav, Gav...");
}
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question