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 49711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:28:46+00:00 2026-05-10T16:28:46+00:00

The system I work on here was written before .net 2.0 and didn’t have

  • 0

The system I work on here was written before .net 2.0 and didn’t have the benefit of generics. It was eventually updated to 2.0, but none of the code was refactored due to time constraints. There are a number of places where the code uses ArraysLists etc. that store things as objects.

From performance perspective, how important change the code to using generics? I know from a perfomance perspective, boxing and unboxing etc., it is inefficient, but how much of a performance gain will there really be from changing it? Are generics something to use on a go forward basis, or it there enough of a performance change that a conscience effort should be made to update old code?

  • 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. 2026-05-10T16:28:47+00:00Added an answer on May 10, 2026 at 4:28 pm

    Technically the performance of generics is, as you say, better. However, unless performance is hugely important AND you’ve already optimised in other areas you’re likely to get MUCH better improvements by spending your time elsewhere.

    I would suggest:

    • use generics going forward.
    • if you have solid unit tests then refactor to generics as you touch code
    • spend other time doing refactorings/measurement that will significantly improve performance (database calls, changing data structures, etc) rather than a few milliseconds here and there.

    Of course there’s reasons other than performance to change to generics:

    • less error prone, since you have compile-time checking of types
    • more readable, you don’t need to cast all over the place and it’s obvious what type is stored in a collection
    • if you’re using generics going forward, then it’s cleaner to use them everywhere
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

System.IO.Path in .NET is notoriously clumsy to work with. In my various projects I
I frequently work with the System.IO namespace. Is there a way to have that
At work, we have a client-server system where clients submit requests to a web
We have a situation at work where developers working on a legacy (core) system
I've created an almost full working login system, but my registration page doesn't work
I have a class library written in .Net that I would like to make
I have written a simple upload component in Flash, but I am now having
I have written an ASP.NET web page with C# behind that runs an existing
I work at a gaming cybercafe, and we've got a system here (smartlaunch) which
I have a pretty complex class which extends System.Windows.Forms.UserControl . It's written in C++/CLI

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.