12. C# 文件操作
string[] path = Directory.GetFiles(@path,"*.jpg");// 获取目录下的所有jpg文件
播放音乐
1 // 2 // 摘要: 3 // 控制 .wav 文件中的声音播放。 4 [ToolboxItem(false)] 5 public class SoundPlayer : Component, ISerializable 6 { 7 }
可能的错误
1).C#异常提示.mp3的文件不是一个有效的波形文件 https://blog.csdn.net/weixin_44031029/article/details/104881331
2.文件读写操作
//读取
byte[] buffer = File.ReadAllBytes(@"filePath");
Console.ReadKey();
////写入
//File.WriteAllBytes(@"newFilePath", buffer);
3.
如果岁月不可回头,何不拼手一搏

浙公网安备 33010602011771号