首页 新闻 会员 周边 捐助

c# 结构 IEquatable

0
悬赏园豆:5 [已关闭问题] 关闭于 2018-08-08 19:03
 foreach (SoundCaptureDevice device in SoundCaptureDevice.AllAvailable)
            {
                devicesCmb.Items.Add(device);
                Console.WriteLine(i);
            }
// SoundCaptureDevice.AllAvailable 这步很慢
// 这跟下两个代码 原本在A项目里的主界面被调用 正常
// 新建一个项目 引入A项目 按钮事件中 调用 a项目的主界面
// 就一直卡在 SoundCaptureDevice.AllAvailable

public struct SoundCaptureDevice : IEquatable<SoundCaptureDevice>
    {
        public static readonly SoundCaptureDevice Default;

        public SoundCaptureDevice(string description, Guid driverGuid, string moduleName);

        public static IEnumerable<SoundCaptureDevice> AllAvailable { get; }
        public string Description { get; }
        public Guid DriverGuid { get; }
        public string ModuleName { get; }

        public bool Equals(SoundCaptureDevice other);
        public override bool Equals(object obj);
        public override int GetHashCode();
        public override string ToString();

        public static bool operator ==(SoundCaptureDevice device1, SoundCaptureDevice device2);
        public static bool operator !=(SoundCaptureDevice device1, SoundCaptureDevice device2);
    }
九剑.sk的主页 九剑.sk | 初学一级 | 园豆:182
提问于:2018-07-24 02:04

86 64
4.5 4.0

九剑.sk 6年前
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册