crackyourinterview.com


To improves our performance please Like Share Subscribe(Will boost us)

What are main drawback of generics in cSharp?
Question Posted on 14 Aug 2022Home >> DotNet >> C# >> What are main drawback of generics in cSharp?

What are main drawback of generics in cSharp?
Below are the main drawback of generics in c#:-
(1)Lightweight dynamic methods cannot be generic.
(2)Generics cannot be used with enumerations and enumerations can not have generic type parameters. And enumeration can be generic only incidentally. To understand this we will take example of because it is nested in a generic type that is defined using Visual Basic, C#, or C++.
(3)The .NET framework will not support context-bound generic types to ger more details we will explain more deeply here as Generic types can be derived from most base classes like MarshalByRefObject(Here we used constraints to require that generic type parameter derive from base calsses like marshalByRefObject). Now come to context-bound generic types a generic type can be derived from ContextBoundObject, but trying to create an instance of that type causes a TypeLoadException.
(4)In C++, C# and visual Basic nested type is enclosed in generic type and cannot be instantiated unless type have been assigned to type parameters of all enclosing types.
0
0



.


Most Visited Questions:-

Deep Learning Questions Answers
Below are the different Deep Leaning Questions and answer a More...

Continuous Integration Questions Answers
Below are the 20 odd questions for CI or Continuous Integra More...

Derived relationships in Association Rule Mining are represented in the form of __________.
Derived relationships in Association Rule Mining are repres More...

What is Gulpjs and some multiple choice questions on Gulp
Gulpjs is an open source whihc helps in building Javascript More...

Microservices Architecture Questions Answers
Below are the different questions on Microservices Architec More...




Other Important Questions

Simplest definition of partial classes and its rules?

Definition of Tuple class with some examples?

Define Race Condition in cSharp?

C#.Net Reserve Words

can we inherit private class level variables in c#






@2014-2022 Crackyourinterview (All rights reserved)
Privacy Policy - Disclaimer - Sitemap