Using using and Namespaces - CSharp Custom Type

CSharp examples for Custom Type:namespace

Description

Using using and Namespaces

Demo Code

using System;//from   w  ww.j  av a2s  . co m
class name
{
   public string first;
   public string last;
}
class NameApp
{
   public static void Main()
   {
      name you = new name();
      Console.Write("Enter your first name and press enter: ");
      you.first = Console.ReadLine();
      System.Console.Write("\n{0}, enter your last name and press enter: ", you.first);
      you.last = System.Console.ReadLine();
      Console.WriteLine("\nData has been entered.....");
      System.Console.WriteLine("You claim to be {0} {1}", you.first, you.last);
   }
}

Result


Related Tutorials