BARMAJA_CSHARP Telegram 153
إ₰...👨🏻‍💻CODE👩🏻‍💻...₰❥

مثال بسيط يوضح مفهوم الدوال الوهمية Virtual :-

using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;

namespace CSharp
{
class Human
{
virtual public void job()
{
Console.Write("I work, ");
}
}
class Teacher : Human
{
public override void job()
{
base.job();
Console.WriteLine("I am a teacher");
}
}

class Employee : Human
{
public override void job()
{
//base.job;
Console.WriteLine("I am an employee");
}
}
class Engineer : Human
{
new public void job()
{
Console.WriteLine("I am an engineer");
}
}

class Program
{
static void Main(string[] args)
{
Human Wasam = new Teacher();
Human Ali = new Employee();
Engineer Hamza = new Engineer();
Wasam.job();
Ali.job();
Hamza.job();
Console.ReadKey();
}
}
}


•┈┈┈•❈••✦✾✦••❈•┈┈┈•
❥➺┊ @barmaja_Csharp
•┈┈┈•❈••✦✾✦••❈•┈┈┈•


إ₰...Output....₰❥

I work, I am a teacher
I am an employee
I am an engineer



tgoop.com/barmaja_Csharp/153
Create:
Last Update:

إ₰...👨🏻‍💻CODE👩🏻‍💻...₰❥

مثال بسيط يوضح مفهوم الدوال الوهمية Virtual :-

using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;

namespace CSharp
{
class Human
{
virtual public void job()
{
Console.Write("I work, ");
}
}
class Teacher : Human
{
public override void job()
{
base.job();
Console.WriteLine("I am a teacher");
}
}

class Employee : Human
{
public override void job()
{
//base.job;
Console.WriteLine("I am an employee");
}
}
class Engineer : Human
{
new public void job()
{
Console.WriteLine("I am an engineer");
}
}

class Program
{
static void Main(string[] args)
{
Human Wasam = new Teacher();
Human Ali = new Employee();
Engineer Hamza = new Engineer();
Wasam.job();
Ali.job();
Hamza.job();
Console.ReadKey();
}
}
}


•┈┈┈•❈••✦✾✦••❈•┈┈┈•
❥➺┊ @barmaja_Csharp
•┈┈┈•❈••✦✾✦••❈•┈┈┈•


إ₰...Output....₰❥

I work, I am a teacher
I am an employee
I am an engineer

BY ❥͢ ❈↡< C# > برمجة


Share with your friend now:
tgoop.com/barmaja_Csharp/153

View MORE
Open in Telegram


Telegram News

Date: |

Just as the Bitcoin turmoil continues, crypto traders have taken to Telegram to voice their feelings. Crypto investors can reduce their anxiety about losses by joining the “Bear Market Screaming Therapy Group” on Telegram. Commenting about the court's concerns about the spread of false information related to the elections, Minister Fachin noted Brazil is "facing circumstances that could put Brazil's democracy at risk." During the meeting, the information technology secretary at the TSE, Julio Valente, put forward a list of requests the court believes will disinformation. 2How to set up a Telegram channel? (A step-by-step tutorial) best-secure-messaging-apps-shutterstock-1892950018.jpg Deputy District Judge Peter Hui sentenced computer technician Ng Man-ho on Thursday, a month after the 27-year-old, who ran a Telegram group called SUCK Channel, was found guilty of seven charges of conspiring to incite others to commit illegal acts during the 2019 extradition bill protests and subsequent months.
from us


Telegram ❥͢ ❈↡< C# > برمجة
FROM American