Created
July 6, 2020 17:48
-
-
Save PrateekKumarSingh/e98f5cadda48165a444ac5f892f35635 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Parent; | |
namespace Parent | |
{ | |
// another class in another namespace | |
public class Child | |
{ | |
public string getName() | |
{ | |
return "Prateek"; | |
} | |
} | |
} | |
namespace app | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
// using the class 'Child' of 'Parent' Namespace | |
Child c = new Child(); | |
Console.WriteLine("Hello World! from "+c.getName()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment