| C# Question Answers-121 - 130 | Thread Synchronization in C# | |
C# (C-Sharp) Question Answers - 131-140 |
System.Object
Used to clean up resources; executes whether or not an exception occurred.
Specifying a System.Exception object ensures only known exceptions are caught and handled properly.
All interface members must be public by default.
Yes
using (Font font = new Font("Arial", 10.0f))
{
font = new Font("Verdana", 10.0f); // Not allowed; throws exception
}
C# is statically typed, object-oriented, with richer syntax (properties, events). Enforces type safety unlike Python.
Common Language Runtime manages execution, memory, type safety, and cross-language interoperability.
ref requires initialization before passing.out does not require initialization, but must be assigned inside the method. | C# Question Answers-121 - 130 | Thread Synchronization in C# | |