Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

Base c#

 class Person
     {
         public string Name { get; set; }
         public Person(string name)
         {
             Name = name;
         }
         public void Print()
         {
             Console.WriteLine(Name);
         }
     }

     class Employee : Person
     {
         public string Company { get; set; }
         public Employee(string name, string company): base(name)
         {
             Company = company;

         }
     }
     class Program
     {
         static void Main(string[] args)
         {
             Person person = new Person("Bob");
             person.Print();     // Bob
             Employee employee = new Employee("Tom", "Microsoft");
             employee.Print();   // Tom
         }
     }
Comment

PREVIOUS NEXT
Code Example
Csharp :: sends keys enter selenium c# 
Csharp :: page parent wpf 
Csharp :: c# while loops 
Csharp :: How to set default page asp.net MVC 
Csharp :: linq convert list to another list 
Csharp :: c# anonymous type as return value 
Csharp :: unity camera.main.screentoworldpoint(input.mouseposition) not working 
Csharp :: sql server query output to json file automatically 
Csharp :: how to show a first item in a combobox in c# winforms 
Csharp :: C# Console font 
Csharp :: oauth API with the Access Token to retrieve some of users information. 
Csharp :: c# template strings 
Csharp :: dbset syntax 
Csharp :: datetime show 24 hour format c# 
Csharp :: unity action 
Csharp :: symfony debug bar 
Csharp :: c# out argument 
Csharp :: send email every 5 minutes c# 
Csharp :: ioptions mock c# unittest 
Csharp :: C# varible 
Csharp :: c# predicate 
Csharp :: O thread de chamada não pode aceder a este objecto porque existe outro thread que já o tem 
Csharp :: List of border roleplays roblox 
Csharp :: ef6 export update 
Csharp :: c# XmlElement from string 
Csharp :: Bitwise Left Shift C# 
Csharp :: how to use display attibute .net core 
Csharp :: Alll select options unselectable 
Csharp :: how to know if object with a certain tag exists unity c# 
Csharp :: how download file from internet and move it to folder with c# 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =