Create dynamic variable name

前端 未结 5 1598
太阳男子
太阳男子 2020-11-22 07:56

Can we create dynamic variable in C#?

I know my below code is threw error and very poor coding. But this code have small logic like create dynamic variable

5条回答
  •  余生分开走
    2020-11-22 08:25

    This is not possible, it will give you a compile time error,

    You can use array for this type of requirement .

    For your Reference :

    http://msdn.microsoft.com/en-us/library/aa288453%28v=vs.71%29.aspx

提交回复
热议问题