| Home | Contact us |
|
|
|
|
|
What is a constant?
A constant is a class member that represents a constant value: a value that can be computed at compile-time.
Constants are permitted to depend on other constants within the same program as long as there are no circular dependencies. The example
class Constants
{
public const int A = 1;
public const int B = A + 1;
}
shows a class named Constants that has two public constants
Category: Object Oriented Programming (OOPS) Concepts Faqs, Interview Questions & Answers
|
|
|
|
|
|
|