Hi Guest

MobileUser

1 HomePage 1 Jobs 1 WalkIn 1Articles  

Cat Exam

 :) Latest Topic
AJAX
VB.NET
SQL Query
UDDI
CLASS
JavaScript Questions
SharePoint Interview
SilverLight
WCF
general knowledge
 ASP.NET
 :) Hot Jobs
 
 :) Latest Articles


  

 


What are main drawback of generics in cSharp?
Question Posted on 14 Aug 2022

Home >> 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



 
 Input Your Comments Or suggestions(If Any)
 Name
 Email(optional)
 Comments


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#






 
Top Searches:asp net questions vb net questions sql query uddl questions class javascript Questions sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |