C# Interview Question and Answers
31. |
Can you store multiple data types in System.Array? |
|
No |
|
|
32. |
Are private class-level variables inherited? |
|
Yes, but they are not accessible. Although they are not visible or accessible via the class interface, they are inherited. |
|
|
33. |
Does C# support multiple-inheritance? |
|
No, use interfaces instead.
|
|
|
34. |
Can you override private virtual methods? |
|
No, moreover, you cannot access private methods in inherited classes, have to be protected in the base class to allow any sort of access.
|
|
|
35. |
How do you inherit from a class in C#? |
|
Place a colon and then the name of the base class. Notice that it's double colon in C++. |
|
|