How can I use .NET enumeration (Which has '+') in MATLAB?

2 次查看(过去 30 天)
I have some questin while using .NET enumerations in MATLAB. Is there anyone could help? Thanks in advance! Here I use .NET 'System' to reproduce my problem.
  • Load the .Net Assembly 'System':
asmInfo=NET.addAssembly('System');
  • Check 'asmInfo.Enums' in the workspace.There seems to be two types of "Enums": those with "+" and those without "+", for example, "Microsoft.Win32.PowerModes" and "System.Net.Configuration.ProxyElement+BypassOnLocalValues".I know how to use the enumerations without "+":
temp1=Microsoft.Win32.PowerModes.Resume;
But I don't know how to use those with "+". It doesn't work in this way:
temp2=System.Net.Configuration.ProxyElement+BypassOnLocalValues.Unspecified;
However, it works after I create the correcsponding object. Must I do it in this way? Is it possible to use this enumeration before creating the object?
temp2=System.Net.Configuration.ProxyElement;
temp3=System.Net.Configuration.BypassOnLocalValues.Unspecified;

采纳的回答

David
David 2021-7-21

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Microsoft .NET 快速入门 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!