×

Multiple-Choice Questions

Web Technologies MCQs

Computer Science Subjects MCQs

Databases MCQs

Programming MCQs

Testing Software MCQs

Digital Marketing Subjects MCQs

Cloud Computing Softwares MCQs

AI/ML Subjects MCQs

Engineering Subjects MCQs

Office Related Programs MCQs

Management MCQs

More

What is the correct syntax to define a C# constant?

24. What is the correct syntax to define a C# constant?

  1. const type constant_name;
  2. const type constant_name = value;
  3. const constant_name as type;
  4. const constant_name as type = value;

Answer: B) const type constant_name = value;

Explanation:

The correct syntax to define a C# constant is:

const type constant_name = value;

Note: A const field requires a value to be provided.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.