Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3609370
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:37:09+00:00 2026-05-18T21:37:09+00:00

What are generics in C#, illustrated with a simple example? What are some related

  • 0

What are generics in C#, illustrated with a simple example? What are some related articles or websites for this topic?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T21:37:10+00:00Added an answer on May 18, 2026 at 9:37 pm

    Generics refers to the technique of writing the code for a class without specifying the data type(s) that the class works on.

    You specify the data type when you declare an instance of a generic class. This allows a generic class to be specialized for many different data types while only having to write the class once.

    A great example are the many collection classes in .NET. Each collection class has it’s own implementation of how the collection is created and managed. But they use generics to allow their class to work with collections of any type.

    http://msdn.microsoft.com/en-us/library/ms379564(VS.80).aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found a strange problem when I used class Generics Today: Setting some broke
I've got a problem with inheritance and generics. This is the code that illustrates
My generic problem is illustrated by the following example: f=@(x,y) cos(x.*y); Yvalues = linspace(0,1,50);
I learned java generics some time ago, but now I'm learning collections and found
I've managed to wrap my head around some of C++'s functional capacities (for_each, mapping
I've seen this problem come up a lot, but never adequately handled, and I
I've seen a lot of example code written using something like (please forgive how
Generics in Java is noisy sometimes. The parameterized types are thrown out by the
In generics we can give constraints using the where clause like public void MyGeneric
Excuse me if this is a dupe, but I couldn't seem to get the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.