Showing posts with label file extension. Show all posts
Showing posts with label file extension. Show all posts

Friday, June 22, 2012

Open a file with default file extension in C#

[sourcecode language="csharp"]
var fileToOpen = "PATH_TO_FILE";
var process = new Process();
process.StartInfo = new ProcessStartInfo()
{
UseShellExecute = true,
FileName = fileToOpen
};

process.Start();
process.WaitForExit();

[/sourcecode]

UseShellExecute parameter tells Windows to use the default program for the type of file.

WaitForExit will cause your application to wait until the application luanched has been closed.

How to enable CORS in Laravel 5

https://www.youtube.com/watch?v=PozYTvmgcVE 1. Add middleware php artisan make:middleware Cors return $next($request) ->header('Acces...