<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>寫入二進位檔案</Title>
      <Author>Microsoft Corporation</Author>
      <Description>將位元組寫入二進位檔案。</Description>
      <Shortcut>filWriteBin</Shortcut>
    </Header>
    <Snippet>
      <Declarations>
        <Literal>
          <ID>byteArray</ID>
          <Type>Object</Type>
          <ToolTip>取代為 Byte()。</ToolTip>
          <Default>{244, 123, 56, 34}</Default>
        </Literal>
        <Literal>
          <ID>FileName</ID>
          <Type>String</Type>
          <ToolTip>取代為檔案名稱和路徑。</ToolTip>
          <Default>"C:\Output.bin"</Default>
        </Literal>
        <Literal>
          <ID>IsAppend</ID>
          <Type>Boolean</Type>
          <ToolTip>選擇 "True" 附加至檔案，或選擇 "False" 以覆寫檔案。</ToolTip>
          <Default>True</Default>
        </Literal>
      </Declarations>
      <Code Language="VB" Kind="method body"><![CDATA[Dim fileContents() As Byte = $byteArray$
My.Computer.FileSystem.WriteAllBytes($FileName$, fileContents, $IsAppend$)]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>
