Question: C sharp questions.. Provide 2 ways to initialize a private static field? Does a class have to have a constructor defined? How many constructors can

C sharp questions..

Provide 2 ways to initialize a private static field?

Does a class have to have a constructor defined?

How many constructors can a class have?

Why do we need to define a property?

Can a class have a property even if the class does not have a private field?

Can / should a property be defined as private?

Can a method be defined as private ? and if so, when would you do that?

What is a static method? And what is the difference between an instance method and a static method?

What is the purpose of class inheritance?

If a class A inherits a class B, what part of class A does class B inherit?

What part of class A that is not inherited from class B

If a child class (B) needs to redefine a method in the parent class (A), what should it do? And what do we call that? (considering simple inheritance)

Explain the relationship between a child constructor and its parent constructor.

What class is the parent or base class of all the classes in .Net

List the methods that each class in .Net automatically inherits.

What is the is a property? Explain using an example

What does polymorphism mean? Explain

What keywords must you use to apply polymorphism?

Does a child class have to override every method in the parent class?

What is an abstract method? Define such method.

What is an abstract property? Define such method.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!