General C# stuff Flashcards
Difference between Response.Write() andResponse.Output.Write().
1. Response.Output.Write() allows you to buffer output
2. Response.Output.Write() allows you to write formatted output
3. Response.Output.Write() allows you to flush output
4. Response.Output.Write() allows you to stream output
Response.Output.Write() allows you to write formatted output
In C# “using” is
1. Function
2. Class
3. Directive
4. Method
Directive. It allows you to specify the namespace in the program. This card referes to the directive. However, there is also a using statement that allows for proper disposal of disposable objects. The latter is used in resource management
What are the access modifiers in C#?
- public (full visibility. All classes can access it)
- private (restricted visibility. Can only be used within the class that declared it)
- protected (can only access it within the same class. However, if the class gets inhertited, the child class can also access the protected members)
- internal (The code is only accessible within its own assembly, but not from another assembly)
Are interface methods in C# public by default
Yes they are public and abstract by default
Which of the following is an 8-byte integer?
1. Char
2. Long
3. Short
4. Integer
Long
https://www.w3schools.com/cs/cs_data_types.php