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: |

Joined by Telegram's representative in Brazil, Alan Campos, Perekopsky noted the platform was unable to cater to some of the TSE requests due to the company's operational setup. But Perekopsky added that these requests could be studied for future implementation. End-to-end encryption is an important feature in messaging, as it's the first step in protecting users from surveillance. You can invite up to 200 people from your contacts to join your channel as the next step. Select the users you want to add and click “Invite.” You can skip this step altogether. The administrator of a telegram group, "Suck Channel," was sentenced to six years and six months in prison for seven counts of incitement yesterday. Matt Hussey, editorial director at NEAR Protocol also responded to this news with “#meIRL”. Just as you search “Bear Market Screaming” in Telegram, you will see a Pepe frog yelling as the group’s featured image.
from us


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