Course Content

Course Content


The keyword enum is used to describe a set of options. It's where enumeration types are declared. The programmer can design his or her own data type and specify the values that these data types' variables can carry. This enumeration data type aids with programme comprehension.

Structures are used to organize data into groups and use them as building blocks for larger programs. Structures also make it easier for developers to reuse code when they need to work with the same pieces of information more than once.

The following example demonstrates how a structure is created using the C# language:

  • struct Student { string name; int grade; DateTime birthDate; }
  • Student student1 = new Student { "John Smith", 90, DateTime.Now };
  • Student student2 = new Student { "Mary Smith", 89, DateTime.Now };
  • student1.grade = 90; // Equals

Description of the C# programming language. Also see. A value type defined by a series of named constants of the underlying integral numeric type is known as an enumeration type (or enum type). Use the enum keyword and the names of enum members to define an enumeration type: Spring, Summer, Autumn, and Winter are enumerated in C#.

In C#, both structures and enums are specialised value types. Structs enable us to define small, enclosed values and distribute them as a group. Constructors, methods, and properties are all possible.

Recommended Courses

Share With Friend

Have a friend to whom you would want to share this course?

Download LearnVern App

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
Apple App Store
598K+ Downloads
App Download Section Circle 1
4.57 Avg. Ratings
App Download Section Circle 2
15K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere