C# abstract classes 👻
C# abstract classes tutorial example explained #C# #abstract #classes using System; namespace MyFirstProgram { class Program { static void...
🔥 Related Trending Topics
LIVE TRENDSThis video may be related to current global trending topics. Click any trend to explore more videos about what's hot right now!
THIS VIDEO IS TRENDING!
This video is currently trending in Thailand under the topic 'สภาพอากาศ'.
About this video
C# abstract classes tutorial example explained
#C# #abstract #classes
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;
}
}
Video Information
Views
109.6K
Total views since publication
Likes
4.0K
User likes and reactions
Duration
2:36
Video length
Published
Jul 3, 2021
Release date
Quality
hd
Video definition
About the Channel
Tags and Topics
This video is tagged with the following topics. Click any tag to explore more related content and discover similar videos:
#.net #C# #Visual Studio #code #programming #tutorial #training #how to #tim corey #C# training #C# tutorial #c# interface #c# abstract #abstract class #c# training video #abstract classes in c# #interfaces and abstract classes in c# #interfaces and abstract classes #c# inheritance #c# inheritance and polymorphism #c# inheritance example
Tags help categorize content and make it easier to find related videos. Browse our collection to discover more content in these categories.