0

Possible Duplicate:
Open file with associated application

I want to open a file in it respective application, e.g. open function of windows.

Same thing can be done in java with the help of Desktop class where you pass the file name and the respective file is opened.

But no idea how to do in C#.

Community
  • 1
  • 1
HDK
  • 9
  • 2
  • Nope! There isn't and this thread is not duplicate. Java's Desktop includes - launching the user-default browser,mail client, registered application to open, edit or print a specified file. – KV Prajapati Dec 07 '12 at 03:12
  • @AVD, that may all be so, but the OP was specific about a particular feature and the ability to "open a file in it respective application" is in fact possible (and trivial) in C#. – Kirk Woll Dec 07 '12 at 03:17

1 Answers1

1
System.Diagnostics.Process.Start("filename.doc");
Dai
  • 141,631
  • 28
  • 261
  • 374