C# Programming Fundamentals
Test your knowledge of core C# concepts including objects, delegates, interfaces, inheritance, polymorphism, threading, and string manipulation.
Questions
String mystring; Creates a(n)
- Class
- Constructor
- Object
- a and b
An Event is
- The result of a users action
- result of a party
- code to force users action
A delegate defines
- a Wahsington representative
- a class that encapsulates methods
- a means of passing arrays into methods
- a substitue for an inherited method
Is it possible to pass methods as arguments for other methods without modification.
- True
- False
All interfaces must contain IDrivable
- True
- False
What is the proper header for a class that intends to use an interface.
- class MyClass IFace
- class MyClass ; IFace
- class MyClass : IFace
- class MyCalss {IFace}
- class MyCalss(IFace)
In order for a class to use an interface, it must
- inherit the properties of the interface
- contain the same methods as the interface
- create an interface objects
- a and b
- all of the above
Every class directly or indirectly extends the______class.
- System
- Object
- Drawing
- Console
The concept of composition specifies that you can.
- Compose good code with C#
- Compose C# projects with different objects
- Reduce errors by remaining composed during programming
- all of the above
Polymorphism occurs when the methods of the child class.
- Override the parent class methods but maintain the implementation
- Maintain the same return type and arguments as the parent class, but implement it differently
- Have different return types and arguments than the parent class
- Are Virtual
The way of returning a thread from s suspended state is:
- Pulse
- PulseAll
- Interrupt
- Resume
- ReStart
In order to lock/unlock an object use the.
- Lock and Unlock methods
- Enter and Exit methods
- Close and Open methods
- Close and Allow methods
Class String and the Char structure found in the:
- System.Strings namespace
- System.Text namespace
- System.Chars namespace
- System namespace
A String literal is a:
- only contains one character
- contains numbers rather than letters
- sequence of characters in double quotation marks
- contains exactly its variable name and nothing else
To create a string literal exclude escape sequence, use:
- !string
- @string
- #string
- $string