C# Corner
Tech
News
Videos
Forums
Trainings
Books
Events
More
Interviews
Jobs
Live
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
Java
Learn iOS Programming
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
7
Reply
What is generic type ?
Sandeep Kumar
9y
2k
0
Reply
Delete Row
Delete Column
Insert Link
×
Insert
Cancel
Embed YouTube Video
×
Width (%)
Height (%)
Insert
Cancel
Table Options
×
Rows
Columns
First row as header
Create Table
Insert Image
×
Selected file:
Alignment
Left
Center
Right
Select an image from your device to upload
Upload to Server
Cancel
Submit
It reduce the code repetition ...............
Bilal Ansari
9y
1
It reduce the code repetition ...............
Bilal Ansari
9y
0
Generic mean generalization of code, Writing generic code to reduce repetition of code.
Amit Kumawat
9y
0
To reduce the code repetition, generics is introduced where which has tendency to deal with any type of datatype which was defined during run-time.
Bhuvanesh Mohankumar
9y
0
Generics were added to version 2.0 of the C# language and the common language runtime (CLR). Generics introduce to the .NET Framework the concept of type parameters, which make it possible to design classes and methods that defer the specification of one or more types until the class or method is declared and instantiated by client code. For example, by using a generic type parameter T you can write a single class that other client code can use without incurring the cost or risk of runtime casts or boxing operations public class GenericList
{ void Add(T input) { } } class TestGenericList { private class ExampleClass { } static void Main() { // Declare a list of type int. GenericList
list1 = new GenericList
(); // Declare a list of type string. GenericList
list2 = new GenericList
(); // Declare a list of type ExampleClass. GenericList
list3 = new GenericList
(); } }
Kml Surani
9y
0
Generics were added to version 2.0 of the C# language and the common language runtime (CLR). Generics introduce to the .NET Framework the concept of type parameters, which make it possible to design classes and methods that defer the specification of one or more types until the class or method is declared and instantiated by client code. For example, by using a generic type parameter T you can write a single class that other client code can use without incurring the cost or risk of runtime casts or boxing operationspublic class GenericList
{void Add(T input) { } } class TestGenericList {private class ExampleClass { }static void Main(){// Declare a list of type int.GenericList
list1 = new GenericList
();// Declare a list of type string.GenericList
list2 = new GenericList
();// Declare a list of type ExampleClass.GenericList
list3 = new GenericList
();} }
Praveen Dhatrika
9y
0
Generic type use to seprate the data type or it use to make collection as strong type.
Sandeep Kumar
9y
0
What is syntax for create array?
What is difference between collection and array?
Message