<?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>filReadMy</Shortcut>
    </Header>
    <Snippet>
      <Declarations>
        <Literal>
          <ID>filename</ID>
          <ToolTip>取代為檔案名稱。</ToolTip>
          <Default>"test.txt"</Default>
        </Literal>
      </Declarations>
      <Code Language="VB" Kind="method body"><![CDATA[Dim fullFilePath As String
Dim fileContents As String
With My.Computer.FileSystem
    fullFilePath = .CombinePath(.SpecialDirectories.MyDocuments, $filename$)
    fileContents = .ReadAllText(fullFilePath)
End With]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>
