如何隐藏系统对象将C#dll导入Python时的Intellisense成员

2024-10-03 06:29:46 发布

您现在位置:Python中文网/ 问答频道 /正文

我想藏起来系统对象方法[Equals()、GetType()、ToString()、GetHashCode()]在导入C#dll时,不在python应用程序的Intellisense中显示。我已经试过了。我将接口继承到我的父类中,父类将在python中实例化。你知道吗

[EditorBrowsable(EditorBrowsableState.Never)]
public interface IFluentInterface
{
    [EditorBrowsable(EditorBrowsableState.Never)]
    Type GetType();

    [EditorBrowsable(EditorBrowsableState.Never)]
    int GetHashCode();

    [EditorBrowsable(EditorBrowsableState.Never)]
    string ToString();

    [EditorBrowsable(EditorBrowsableState.Never)]
    bool Equals(object obj);
}

Tags: 对象实例方法应用程序系统dllneverintellisense