随笔分类 - C#(.NET)
C#或者.NET分类
摘要:字符串转为数组 string str = "1,2,3,4"; string[] strArr = str.Split(','); 数组转为字符串 string[] scoresArr = { "1", "2", "3", "4", "5" };string scores = string.Join
阅读全文
摘要:在计算关于“钱”的各种占比时,我遇到了各种问题。 例如: double a=1.4035; Console.WriteLine($"0.##输出:{a.ToString("0.##")}"); ①Console.WriteLine($"F2输出:{a.ToString("F2")}"); ②Cons
阅读全文
摘要:设置背景图片:BackgroundImage属性选择对应的图片就可以了。 背景图片随窗体的变化而变化:BackgroundImageLayout属性值设置为Stretch。 窗体放置图片:PictureBox控件;PictureBox控件的背景为透明:BackColor的值为Transparent。
阅读全文