Question
if false explain why these are c# questions and .net 1. T/F Classes are reference types, which means a variable for any given class type
if false explain why these are c# questions and .net
1. T/F Classes are reference types, which means a variable for any given class type can be assigned null
2. T/F Variables that are unique to each given instance of a class are referred to as instance variables
3. T/F static or class level variables are shared among all instances of the class
4. T/F Static methods can only be called from instances of the class
5. T/F Properties allow a programmer to let the compiler do the work of generating set/get methods
6. T/F C# supports multiple inheritance
7. T/F Methods that are designed to be overridden by derived classes should be marked with the virtual keyword
8. T/F An abstract base class allows you to define a function without an implementation, forcing child classes to
implement the method
9. T/F All interface methods are public and virtual by default
10. T/F C# does not allow a class to implement more than one interface
1. T/F The List class provided in C# uses generics
2. T/F A class must implement the IEnumerable
3. T/F Using generic types allows the compiler to check at compile time if an invalid type of object is being used.
4. T/F Limits can be imposed on generic types to ensure they implement an interface, extend a base class, or even
have a default constructor
5. T/F The ICompareable<> interface is used when objects need to be compared to determine if they are less than,
equal or greater than another object of the same type
6. T/F An Interface type can be specified as the type of argument provided to a method.
7. T/F Instead of using generics, you can create a list of type object and rely on polymorphism.
8. T/F An interface can define properties in addition to methods
9. T/F An interface can implement another interface
10. T/F C# does not allow a class to implement more than one interface
1. T/F A static using directive allows you to reference static methods of a class without using the class name prefix.
2. T/F Specifying a default value for a parameter allows you to make the parameter optional
3. T/F The out and ref keywords are ways of allowing a method to return multiple values
4. T/F The Tuple class is designed for making it easy return multiple values from a method
5. T/F To quickly write to a file, use the WriteAllLines from the File class in the System.IO namespace.
6. T/F When reading from text based files, all of the content is treated as strings
7. T/F Exceptions can be caught and handled to prevent your program from crashing by using try/catch blocks
8. T/F When you write a class, you can use exceptions to force callers to deal with problems rather than silently
continuing
9. T/F Type pattern matching allows code to perform different actions based on what type an object is
10. T/F When pattern matching in a switch, you should match from the most general to the most specific
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started