Dynamically invoke properties by string name using VB.NET

前端 未结 3 546
北海茫月
北海茫月 2020-12-28 14:30

I\'m currently working on a project where a section of the code looks like this:

Select Case oReader.Name
    Case \"NameExample1\"
        Me.Elements.NameE         


        
3条回答
  •  有刺的猬
    2020-12-28 15:19

    I can't believe the other posters told you to use reflection. VB as a CallByName function that does exactly what you want.

提交回复
热议问题