Can I make the name of a new object variable in c#?

后端 未结 4 1479
一个人的身影
一个人的身影 2021-01-23 05:23

For example:

car Audi = new car();

Is it possible to something like this:

string name = Microsoft.VisualBasic.Interaction.Input         


        
4条回答
  •  南方客
    南方客 (楼主)
    2021-01-23 06:05

    The only way I can think of doing it is a C# version of

    car = Car() //basically Python way of initializing car
    
    del car
    
    car = Thing()
    

提交回复
热议问题