在VB中类似于a("b")这种表达,在C#中应该如何表达?
对于VB中的表达:
Dim a As New System.Management.ManagementObjectSearcher("SELECT * FROM Win32_NetworkAdapterConfiguration")
For Each b As System.Management.ManagementObject In a.Get
If CBool(b("sex")) Then
c = b("Address")
中类似于c = b("Address")这种的表达,用C#应该如何表达才好?
请各方高手出手相救......
C#
VB
------解决方案--------------------额,这不是索引吗?
b["Address"]
------解决方案-------------------- b["Address"]