Total Page Preview:   000000000216

How many type of class in dot net core

Type of class 

In .NET Core (now known as .NET 5 and later versions), there are several types of classes you can create, just like in any object-oriented programming language. Some common types of classes you may encounter in .NET Core development include:
1-Regular Classes: These are the most common types of classes you create in C# or any .NET language. They encapsulate data and behavior.
2-Abstract Classes: These are classes that cannot be instantiated on their own and are meant to be base classes for other classes. They can contain abstract methods, which must be implemented by derived classes.
3-Static Classes: These are classes that cannot be instantiated and can only contain static members (fields, methods, properties). They are often used for utility classes or to organize related methods.
4-Partial Classes: These are classes that can be split into multiple files. This is often used to separate automatically generated code from developer-written code.
5-Sealed Classes: These are classes that cannot be inherited. They are often used to prevent derivation or to indicate that the class is complete and should not be extended.
6-Record Types (C# 9 and later): These are immutable reference types primarily used for representing data. They come with built-in value-based equality, immutability, and pattern-matching support.
These are just a few examples of class types in .NET Core (or .NET 5 and later versions). Depending on your application's requirements, you may encounter other types or design patterns such as interfaces, enums, delegates, etc., which are also integral parts of .NET development.

Thank You

About Author

Brijesh Kumar

Database Developer

I have more then 6 years Experience in Microsoft Technologies - SQL Server Database, ETL Azure Cloud - Azure SQL Database, CosmosDB, Azure Data Factory, PowerBI, Web Job, Azure Function, Azure Storage, Web Apps, Powershall and Database Migration On-Premise to Azure Cloud.
LinkedIn :





Facebook User: