C# abstract classes

C# abstract classes

Bro Code

3 года назад

74,695 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Bro Code
Bro Code - 20.06.2021 17:28

using System;

namespace MyFirstProgram
{
class Program
{
static void Main(string[] args)
{
// abstract classes = modifier that indicates missing components or incomplete implementation

Car car = new Car();
Bicycle bicycle = new Bicycle();
Boat boat = new Boat();
//Vehicle vehicle = new Vehicle(); //can't create a vehicle object


Console.ReadKey();
}
}
abstract class Vehicle
{
public int speed = 0;

public void go()
{
Console.WriteLine("This vehicle is moving!");
}
}
class Car : Vehicle
{
public int wheels = 4;
int maxSpeed = 500;
}
class Bicycle : Vehicle
{
public int wheels = 2;
int maxSpeed = 50;
}
class Boat : Vehicle
{
public int wheels = 0;
int maxSpeed = 100;
}
}

Ответить
SM BIPLOB
SM BIPLOB - 23.09.2023 13:37

clean and simple in short video. thank you so much.

Ответить
p4nd4
p4nd4 - 15.09.2023 11:41

I bless the universe that you exist in the same lifetime as me. Thank you so much. I was battling with classes and you narrowed it down for me. I hope this applies well to the work I'm about to do. Thank you once more.

Ответить
Stefan Dempf
Stefan Dempf - 10.09.2023 18:55

rdm comment good vid

Ответить
Jānis Virsnītis
Jānis Virsnītis - 24.08.2023 14:10

je je je

Ответить
Mr. Awesome Dev
Mr. Awesome Dev - 18.08.2023 08:46

Thanks bro

Ответить
Morne Bosch
Morne Bosch - 18.08.2023 08:39

Random comment

Ответить
FireStrike_edits
FireStrike_edits - 07.08.2023 20:36

I loved that example 😂

Ответить
Булат Почанов
Булат Почанов - 07.08.2023 15:20

random comment down below

Ответить
Boost your English vocabulary
Boost your English vocabulary - 04.08.2023 11:28

Wow! Nice!

Ответить
Boyar
Boyar - 03.08.2023 17:28

Better explanation than a c# book and ChatGPT. Bravo !

Ответить
Aapo Rautiainen
Aapo Rautiainen - 19.07.2023 20:31

Doesn't the static keyword do the same thing?

Ответить
Fabiola
Fabiola - 11.07.2023 19:27

You made it so easy to understand that I just came here to comment. Straight to the point videos are so valuable! Already liked the video and subscribed to your channel🎉

Ответить
Cecil Williams
Cecil Williams - 20.06.2023 07:43

Your videos are perfect. It’s great that you’re sharing the videos in a few minutes

Ответить
Olafs
Olafs - 15.06.2023 19:04

Awesome video man

Ответить
Hannah and Richard Kriss
Hannah and Richard Kriss - 13.06.2023 05:21

Random randomComment = new Random();

Ответить
leffrank
leffrank - 01.06.2023 12:14

Thx Bro, the repetition in the end massaged the information into my brain!

Ответить
fahad khan
fahad khan - 01.06.2023 08:22

love u bro you are the best teacher i have got

Ответить
Kyn Doll McCray
Kyn Doll McCray - 25.05.2023 02:45

Bro explained this so well that I'm compelled to comment saying that he did so

Ответить
Will Thomas
Will Thomas - 21.05.2023 16:16

Awesome content, very simple

Ответить