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

조회 수: 3 (최근 30일)
Xiao
Xiao 2018년 2월 22일
답변: David 2021년 7월 21일
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;
  댓글 수: 1
David
David 2021년 7월 21일
I too would like more information on using the "+" enums

댓글을 달려면 로그인하십시오.

채택된 답변

David
David 2021년 7월 21일

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB 中的 .NET 枚举에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!