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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:31:41+00:00 2026-05-13T07:31:41+00:00

is it possible in C# to get an object by name? i.e. get this.obj0

  • 0

is it possible in C# to get an object by name?

i.e. get this.obj0 using

string objectName = "obj0";
executeSomeFunctionOnObject(this.someLoadObjectByName(objectName));
  • 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-13T07:31:42+00:00Added an answer on May 13, 2026 at 7:31 am

    No, it’s not.

    Objects don’t have names – variables do. An object may be referenced by any number of variables: zero, one or many.

    What you can do, however, is get fields (static or instance variables) by name (using Type.GetField) and get the values of those fields (for a specific instance, if you’re using instance variables).

    Depending on what you’re trying to do, you might also want to consider a dictionary from names to objects.

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

Sidebar

Related Questions

Is it possible to get the variable name using which the object was called
Is it possible to get the object name too? #include<cstdio> class one { public:
Possible Duplicates: Get method name and type using lambda expression Can I use Expression<Func<T,
Is it possible to get an Object's attribute through the property tag in struts?
Is it possible to get the originating port from an ActionExecutingContext object? If so,
Is it possible to get the expiry DateTime of an HttpRuntime.Cache object? If so,
Is it possible in Ruby to get a reference to methods of an object
Is is possible to get login credentials such as name/id if user does login
I was wondering if it's possible to get to the name of the method
Is it possible to get gdb or use some other tools to create a

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.