VCReferences.CanAddAssemblyReference(String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回一个值,该值指示是否要添加给定的程序集 (.NET) 引用。
public:
bool CanAddAssemblyReference(System::String ^ bstrRef);
public:
bool CanAddAssemblyReference(Platform::String ^ bstrRef);
bool CanAddAssemblyReference(std::wstring const & bstrRef);
[System.Runtime.InteropServices.DispId(903)]
public bool CanAddAssemblyReference (string bstrRef);
[<System.Runtime.InteropServices.DispId(903)>]
abstract member CanAddAssemblyReference : string -> bool
Public Function CanAddAssemblyReference (bstrRef As String) As Boolean
参数
- bstrRef
- String
程序集引用。
返回
true 若要添加给定的程序集引用,则为;否则为 false 。
- 属性
注解
例如,如果具有无效的 GUID,则不能添加程序集引用。
此方法通常与方法结合使用 AddAssemblyReference 。 您可以使用此方法来确定是否可以添加程序集引用,如果是,则调用 AddAssemblyReference 。