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

  • Home
  • SEARCH
  • 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 3990352
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:29:01+00:00 2026-05-20T06:29:01+00:00

I have recently made the transition from a Java web developer to a C#

  • 0

I have recently made the transition from a Java web developer to a C# application developer doing mostly WPF applications. I used to use Spring MVC with Java, where a lot of the code structure was preempted and setup for me. Since I have made the transition to WPF, my applications are reliant on my ability to setup reusable, decoupled code.

I have been trying to improve my skills with certain areas of design including Generics,Design Patterns and Reflection.

I am well aware of what all these are and for Generics and Design patterns, I am fairly well at applying what I consider best practices(although this is up in the air).

What I am not too familiar with is reflection. I know what reflection is, and I know how to do it to do tasks such as dynamic assembly loading,method and class invocation,etc.

What I do not understand is examples how this might be able to help me.

I constantly hear how reflection can be really helpful if you know how to use it. When I try to research the topic, I only find tutorials and reference of how to do it, instead of the good that it can be used for.

My question is what can I look to as a WPF Developer in using reflection for that will help me, and/or is there a place, or reference that can give me more then just the syntax of using reflection, but also real world examples and/or best practices?

  • 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-20T06:29:02+00:00Added an answer on May 20, 2026 at 6:29 am

    Reflection is a bit like anonymous methods: It’s really hard to see where it’s useful until you see the first use case; after that, it’s usually easier to figure out.

    Here’s an actual example from code I wrote about a year and a half ago. For a student project at my university, we were writing a bot in C#, for the purpose of playing Texas Hold ’em. We also wrote an event-based engine which handled the game itself, and included network support to allow both humans and computers to join in from any number of different machines. To allow us to see what was going on, we wrote a separate GUI application which was used to start, join, and participate in games. All players would get added through this application, bots and humans alike.

    We implemented our bot to act based on a model, but as we progressed through the project, we made changes to that model, essentially creating different versions of that bot. In our system, we had one class per version of our model.

    Once you have different versions, it’s nice to be able to compare them against each other to see if your changes have any effect. To do that, we tagged each of our computer player classes with a custom attribute, which we called CPUAttribute.

    That’s where reflection came into play: on startup, our GUI would use reflection look at the appropriate assembly and find all of the types we had tagged. Those types would then get added to a dropdown box, and reflection was used to instantiate the selected type when you created the player.

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

Sidebar

Related Questions

I have recently upgraded some of my web applications to ASP.NET 3.5 by installing
I have recently reinstalled MacOSX, and at some point (without realizing it) I made
Recently I have discovered that my release executable (made with msvc++ express 2008) becomes
I have recently installed .net 3.5 SP1. When I deployed a compiled web site
I have recently written an application(vb.net) that stores and allows searching for old council
I have recently been doing a bit of investigation into the different types of
Have recently been given a project to complete which uses XML quite extensively.Am looking
I have recently started having problems with TortoiseCVS, or more specifically with plink, the
I have recently started using Vim as my text editor and am currently working
I have recently run across these terms few times but I am quite confused

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.