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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:20:52+00:00 2026-05-23T03:20:52+00:00

Just imagine this simple situation: int temperature = 20; is there any possibility to

  • 0

Just imagine this simple situation:

int temperature = 20;

is there any possibility to give a dynamic parameter name?? Like for example (I know that doesn’t work, just to get the idea) :

int Array[1].ToString() = 20;

Thank you!
Cheers Chris

  • 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-23T03:20:53+00:00Added an answer on May 23, 2026 at 3:20 am

    No. Not in C#. The closest you could get would be to use a Dictionary<string, object>:

    var variables = new Dictionary<string, object>();
    
    variables.Add(Array[1].ToString(), 20);
    

    But not only does that involve casting each time you need to retrieve the value, but it will also cause boxing/unboxing.

    All told, I certainly wouldn’t recommend it.

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

Sidebar

Related Questions

I've never learnt JavaScript, but I imagine this is quite a simple problem. Just
I'm only just learning javascript so I imagine this is relatively simple but it's
This should be relatively simple, here is my situation; I have copied the trunk
I imagine this is pretty dead-simple, but somehow I haven’t been able to get
I imagine that this is a simple question, but I'm getting some strange results
Is it possible ? Or I just imagine ?
everyone. I'm just starting with django, so sorry for a possibly stupid question. Imagine,
Just a thing that annoys me. When I right click on a method name
I'm making a simple learning simulation, where there are multiple organisms on screen. They're
Just imagine you have the following class [DataContract] public class NamedList { [DataMember] public

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.