Answer: Set property is also very useful in Dot Net.It is also known as Write-Only property.We use this property to set or assign any value to any variable from anywhere in the class.
The set property is also enclosed in curly braces({ }) and it must be assigned any value.
Syntax:-
set { variable_name = value; }
Where value is we assign value to variable_name.
Asked In: Many Interviews |
Alert Moderator