Last active
November 1, 2020 10:04
-
-
Save earlgreyxxx/05f068393be34a95ec368a2669d68007 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************* | |
* JUST ONLY PLAY SOUND FILE(WAV) | |
build: | |
>> csc -target:winexe playsound.cs | |
usage: | |
>> playsound logon.wav | |
namespaceは適当に変えてね。 | |
*******************************************/ | |
using System.IO; | |
using System.Media; | |
namespace jp.ptsv.windows | |
{ | |
class PlaySound | |
{ | |
static void Main(string [] args) | |
{ | |
if(args.Length > 0 && File.Exists(args[0])) | |
(new SoundPlayer(args[0])).PlaySync(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment