37 - 38 - Structure in C# TAE1
37 - 38 - Structure in C# TAE1
Department Of MCA
Sub – C#.Net
TOPIC - Structure in c#
Submitted By :
Mahesh Satbhai ( F.Y MCA - 37 )
Mangesh Kavhar ( F.Y MCA - 38 )
1. Introduction to C# Structure:
➢ Fields:
- Data members that store information
- Accessed using dot notation (‘structureInstance.field’).
➢ Methods:
- Functions that operate on the data within the structure.
➢ Properties:
- Accessors for getting and setting values.
- Enhance encapsulation & provide controlled access to
structure members.
4. Differences Between Structure and Class:
• Using structure it become easy to copy the variable’s values onto stack.
• Structures are a valuable tool for organizing and representing simple data
types efficiently.