Test interview


Classes:  can support inheritance, reference type, reference can be null  Struct



Download 238,62 Kb.
Pdf ko'rish
bet4/15
Sana21.06.2022
Hajmi238,62 Kb.
#689239
1   2   3   4   5   6   7   8   9   ...   15
Bog'liq
Interwiew

Classes: 
can support inheritance, reference type, reference can be null 
Struct:
cannot support inheritance, value type,
Both:
cointain methods, support interfaces 
26.
What is a static class? 
A static class in C# is a class that cannot be instantiated. A static class can only 
contain static data members including static methods, static constructors, and static 
properties. In C#, a static class is a class that cannot be instantiated. ... You can't 
create an object for the static class. 
27.
What is a static constructor? 
A static constructor is used to initialize any static data, or to perform a particular 
action that needs to be performed only once. It is called automatically before the first 
instance is created or any static members are referenced. 


28.
What access modifiers do you know?
Private, Protected, Public, Internal, Protected Internal 
29.
What are properties and why are they needed? 
Properties enable a class to expose a public way of getting and setting values, while 
hiding implementation or verification code. A get property accessor is used to return 
the property value, and a set property accessor is used to assign a new value. 
30.
What are auto-properties?
Automatic property in C# is a property that has backing field generated by compiler. 
It saves developers from writing primitive getters and setters that just return value of 
backing field or assign to it. 
31.
What is delegate? 
A delegate is a type that represents references to methods with a particular 
parameter list and return type. When you instantiate a delegate, you can associate 
its instance with any method with a compatible signature and return type. ... In other 
words, a method must have the same return type as the delegate.
32.
Action vs Func vs Predicate? 
Func is a delegate that returns a value. Action is a delegate that returns void. A 
Predicate is similar to a Func that returns true or false. A delegate is like a method 
variable. The delegate can be assigned to any method where the parameters and 
return types match.
33.
What is an event? How is it different from delegate? 
Events are user actions such as key press, clicks, mouse movements, etc., or some 
occurrence such as system generated notifications. Applications need to respond to 
events when they occur.
An event is declared using the event keyword. Delegate is a function pointer. It holds 
the reference of one or more methods at runtime. Delegate is independent and not 
dependent on events. 
34.
What is an attribute and why are they needed? 
Attributes are a powerful feature in the C# programming language that can add 
metadata information to your assemblies. An attribute is actually an object that is 
associated with any of these elements: Assembly, Class, Method, Delegate, Enum, 
Event, Field, Interface, Property and Struct. 


35.
What does "Object-Oriented Programming" mean? 
C# is an 

Download 238,62 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9   ...   15




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©www.hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish