The OpenFileDialog class is defined in Windows.Forms class. You need to add to reference to System.Windows.Form.dll library and call using System.Windows.Forms before using the class. The OpenFileDialog class can be used to open a file similar to CFileDialog's Open method in VC++. This class is derived from FileDialog. OpenFile method of this class opens a file which can be read by steam. In this sample code, I use OpenFileDialog class to browse a file.