使用提供的字节数组创建测试用例的附件。
命名空间:  Microsoft.TeamFoundation.TestManagement.Client
程序集:  Microsoft.TeamFoundation.TestManagement.Client(在 Microsoft.TeamFoundation.TestManagement.Client.dll 中)
语法
声明
Function CreateAttachment ( _
    contents As Byte(), _
    offset As Integer, _
    length As Integer _
) As ITestAttachment
ITestAttachment CreateAttachment(
    byte[] contents,
    int offset,
    int length
)
ITestAttachment^ CreateAttachment(
    array<unsigned char>^ contents, 
    int offset, 
    int length
)
abstract CreateAttachment : 
        contents:byte[] * 
        offset:int * 
        length:int -> ITestAttachment 
function CreateAttachment(
    contents : byte[], 
    offset : int, 
    length : int
) : ITestAttachment
参数
- contents
 类型:array<System.Byte[]
 要从中提取附件的字节数组。
- offset
 类型:System.Int32
 数组中的起始元素。
- length
 类型:System.Int32
 用于创建附件的数组的长度。
返回值
类型:Microsoft.TeamFoundation.TestManagement.Client.ITestAttachment
一个测试附件。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。