title: How to use GetTempPath in VB.net
body: <p>I am not sure what I am doing wrong.</p>
  
  <p>I viewed the Developer help page for this function but it doesn't have any examples</p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/system.io.path.gettemppath.aspx" rel="nofollow">GetTempPath Help</a></p>
  
  <p>Rght now I just want to print the temp directory to a msgbox to make sure I am doing it right. Then I will use it to write to a file</p>
  
  <p>I am new to VB.net and am more familiar with C</p>
  
  <p>Here is my code:</p>
  
  <pre><code>Imports System
  Imports System.IO
  Imports System.Collections
  
  Public Class Form1
  
  Public Shared Function GetTempPath() As String
  End Function
  
  Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
      ...
      ...
  
  Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
      Dim tempFolder As String
      tempFolder = GetTempPath()
      MsgBox(tempFolder)
  End Sub
  </code></pre>
  
  <p>The ellipses just mean there is code there that is unnecessary for the question</p>