如何仅获取Windows域? [英] How to get Windows domain only?

查看:76
本文介绍了如何仅获取Windows域?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



使用

Hi,

With

<system.security.principal.windowsidentity.getcurrent()>

,我可以获取域名和UserID.我想过滤域名,然后将其放入variabele中,以便与其他内容进行比较.

是否只能获取Windows域名?

在此先谢谢您!

I can get the domainname and UserID. I want to filter the domainname and put it in a variabele to compare it with something else.

Is it possible to get only the Windows Domainname?

Thanks in advance!

推荐答案

尝试一下:

Try this:

NetworkInformation.IPGlobalProperties.GetIPGlobalProperties().DomainName;


这篇关于如何仅获取Windows域?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆