shows browsing for a file : Open File Dialog : GUI Windows Form C# Source Code


Custom Search

C# Source Code » GUI Windows Form » Open File Dialog »

 

shows browsing for a file









    

/*
Mastering Visual C# .NET
by Jason Price, Mike Gunderloy

Publisher: Sybex;
ISBN: 0782129110
*/

 /*
  Example15_1.cs shows browsing for a file
*/

using System;
using System.Windows.Forms;

public class Example15_1 {
  
  [STAThread]
  public static void Main() {

    // create and show an open file dialog
  OpenFileDialog dlgOpen = new OpenFileDialog();
  if (dlgOpen.ShowDialog() == DialogResult.OK)
    {
    Console.Write(dlgOpen.FileName);
    }

  }

}


           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo GUI Windows Form
» Open File Dialog