int a = 10; int b = 20; int c = 30; enum color: byte { red = a, green = b, blue = c }
namespace CuriousTabConsoleApplication ( class Sample { private enum color : int { red, green, blue } public void fun() { Console.WriteLine(color.red); } } class Program { static void Main(string[ ] args) { // Use enum color here } } }
namespace College { namespace Lib { class Book { public void Issue() { // Implementation code } } class Journal { public void Issue() { // Implementation code } } } }
College.Lib.Book b = new College.Lib.Book(); b.Issue();
Book b = new Book(); b.Issue();
using College.Lib; Book b = new Book(); b.Issue();
using College; Lib.Book b = new Lib.Book(); b.Issue();
using College.Lib.Book; Book b = new Book(); b.Issue();
Comments
There are no comments.Copyright ©CuriousTab. All rights reserved.