1031

What is static class?

Static Class: A static class is a collection of unrelated methods like utility/helper classes. Hence, it is not related to the real-world object. you can not create an object of it. If the “Static” modifier is used to define a static class along with class name which makes class non-instantiable. If the static modifier is used […]

Read More
1025

What is partial classes and methods?

Partial classes: This feature enables you to split the definition of a class over multiple physical source files with a .cs extension. Each source file contains a section of the type or method definition, and all source files are combined as a single file when the application is compiled. The partial modifier can be applied to a […]

Read More
723

What is Const and Readonly?

Const and ReadOnly keyword are used as types of Constant. Const (read: constant) : Const is a compile-time constant and which field value must be assigned at the time of declaration. By default const is static, hence you can’t define its type as static. Only primitive or “built-in” C# Types (e.g. int, string, double, int, long, char, decimal, […]

Read More