abstract class c#
C#
abstract class Shape
{
public abstract int GetArea();
}
class Square : Shape
{
int side;
public Square(int n) => side = n;
// GetArea method is required to avoid a compile-time error.
public override int GetArea() => side * side;
static void Main()
{
var sq = new Square(12);
Console.WriteLine($"Area of the square = {sq.GetArea()}");
}
}
// Output: Area of the square = 144
Also in C#:
- Title
- unity matchinfo
- Category
- C#
- Title
- read configuration workerservice
- Category
- C#
- Title
- asp net mvc 5 return view from another controller
- Category
- C#
- Title
- c# using get set methods
- Category
- C#
- Title
- condition when a animation finishes in unity
- Category
- C#
- Title
- c# list tuple
- Category
- C#
- Title
- how do I attach a player with a navMeshAgent
- Category
- C#
- Title
- check version of asp.net core
- Category
- C#
- Title
- resize image c#
- Category
- C#
- Title
- arry in c#
- Category
- C#
- Title
- instantiate object in circle
- Category
- C#
- Title
- c# retrieve files in folder
- Category
- C#
- Title
- asp.net core mvc not triggering client side validation
- Category
- C#
- Title
- compose graphql query string in c#
- Category
- C#
- Title
- native-googlesignin configuration is null!?
- Category
- C#
- Title
- unity randomly generated numbers c#
- Category
- C#
- Title
- defualtsize UWP c#
- Category
- C#
- Title
- c# duplicate object instance
- Category
- C#
- Title
- c# download string url
- Category
- C#
- Title
- debug.log unity
- Category
- C#
- Title
- error CS0542
- Category
- C#
- Title
- c# foreach arra
- Category
- C#
- Title
- move towards target unity
- Category
- C#
- Title
- how to create a list in c# unity
- Category
- C#
- Title
- unity deactive all object in list
- Category
- C#
- Title
- c# uppercase string
- Category
- C#
- Title
- how to change the title of the console in c#
- Category
- C#
- Title
- c# convert to nullable datetime
- Category
- C#
- Title
- unity connect to firebase
- Category
- C#
- Title
- bulk update in c# using jquery datatble
- Category
- C#
- Title
- ubuntu: how to open the terminal from c#
- Category
- C#
- Title
- how to create a variable in C#
- Category
- C#
- Title
- Add component object to gameobject unity
- Category
- C#
- Title
- c# dictionary literal initializer
- Category
- C#
- Title
- unity set sprite transparency
- Category
- C#
- Title
- unity how to tell when a gameobject is colliding
- Category
- C#
- Title
- check for collision unity c#
- Category
- C#
- Title
- example HttpClient c# Post
- Category
- C#
- Title
- dont destroy on load unity
- Category
- C#
- Title
- c# empty IEnumerable
- Category
- C#
- Title
- mvc c# w3schools
- Category
- C#
- Title
- unity detect number key
- Category
- C#
- Title
- how to sort string array alphabetically in c#
- Category
- C#
- Title
- how to add to a list c#
- Category
- C#
- Title
- c# loop through list
- Category
- C#
- Title
- unity collider2d contains point
- Category
- C#
- Title
- loop gridcontrol devexpress c#
- Category
- C#
- Title
- what function is called just before the a script is ended c#
- Category
- C#
- Title
- C# get all files in directory
- Category
- C#
- Title
- unity instantiate vector3
- Category
- C#
- Title
- c# quick "is" "as"
- Category
- C#
- Title
- c# store generic type without arguments
- Category
- C#
- Title
- c# how to delete a file
- Category
- C#
- Title
- c# window instantly close
- Category
- C#
- Title
- asp.netcore: develop on win10 run on ubuntu
- Category
- C#
- Title
- how to display an image url in c# picturebox
- Category
- C#
- Title
- nullable unique constraint ef
- Category
- C#
- Title
- unity rigidbody constraints
- Category
- C#
- Title
- unity hide mouse first person
- Category
- C#
- Title
- visual studio c# mark class deprecated
- Category
- C#
- Title
- c# exit for
- Category
- C#
- Title
- c# reverse a string
- Category
- C#
- Title
- load information with txt file to uwp c#
- Category
- C#
- Title
- unity how to change text in script
- Category
- C#
- Title
- c# do loop
- Category
- C#
- Title
- c# class to byte array
- Category
- C#
- Title
- c# find element by condition
- Category
- C#
- Title
- how to make a string a list of characters c#
- Category
- C#
- Title
- beard styles without mustache Intitle:work with me
- Category
- C#
- Title
- how to hide a panel ui unity
- Category
- C#
- Title
- .net core identity get user id
- Category
- C#
- Title
- vb.net check if datatable has rows
- Category
- C#
- Title
- unity indestructible
- Category
- C#
- Title
- what is the and in c#
- Category
- C#
- Title
- c# datafield change cell background color
- Category
- C#
- Title
- order by C#
- Category
- C#
- Title
- c# linq order by multiple columns
- Category
- C#
- Title
- c# AllowSynchronousIO to true
- Category
- C#
- Title
- unity main texture not working
- Category
- C#
- Title
- inheritance in c#
- Category
- C#
- Title
- csharp create array list
- Category
- C#
- Title
- create new object from generic c#
- Category
- C#
- Title
- c# MD5.Create returning nul
- Category
- C#
- Title
- c# instantiate
- Category
- C#
- Title
- fahrenheit to celsius c#
- Category
- C#
- Title
- asp.net get query string parameter
- Category
- C#
- Title
- asp.net core redirecttoaction with parameters
- Category
- C#
- Title
- c# asp.net hover tooltip
- Category
- C#
- Title
- unity if gameobject exists
- Category
- C#
- Title
- get random point within radius
- Category
- C#
- Title
- how to get value from object in c#
- Category
- C#
- Title
- list.addrange in c#
- Category
- C#
- Title
- how get data from json in c#
- Category
- C#
- Title
- external font family uwp c#
- Category
- C#
- Title
- unity to integer
- Category
- C#
- Title
- c# check to see if dictionary key exists
- Category
- C#
- Title
- configure 1 to 1 relation ef
- Category
- C#
- Title
- unity quaternion identity
- Category
- C#
- Title
- comment envoyer un socket C#
- Category
- C#
- Title
- remove from list based on condition c#
- Category
- C#