摘要: using System.IO; string str1 = Path.GetFileName("C:\\Silverlight\\sss.exe"); // sss.exe string str2 = Path.GetFileNameWithoutExtension("C:\\Silverligh 阅读全文
posted @ 2022-07-12 11:09 羽小兮 阅读(104) 评论(0) 推荐(0)
摘要: FileStream 构造函数可以有四个参数: String, FileMode, FileAccess, FileShare, 第一个参数表示路径。后面三个参数如下: FileMode CreateNew 创建新的。文件若存在,则异常。 Create 创建新的。文件若存在,则覆盖。 Open 打开 阅读全文
posted @ 2022-07-12 11:07 羽小兮 阅读(552) 评论(0) 推荐(0)
摘要: var utf8WithoutBom = new UTF8Encoding(false); StreamWriter writer = new StreamWriter(stream, utf8WithoutBom); //写文件内容的操作 //...... writer.Close(); 阅读全文
posted @ 2022-07-12 11:05 羽小兮 阅读(513) 评论(0) 推荐(0)
摘要: // 读取文件的创建、修改、访问时间 FileInfo fi = new FileInfo("C:\\test.txt"); Console.WriteLine(fi.CreationTime.ToString()); Console.WriteLine(fi.LastWriteTime.ToStr 阅读全文
posted @ 2022-07-12 10:59 羽小兮 阅读(435) 评论(0) 推荐(0)
摘要: <Window x:Class="按钮测试enter键.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/ 阅读全文
posted @ 2022-07-01 17:04 羽小兮 阅读(271) 评论(0) 推荐(0)
摘要: 翻译:集合已修改;枚举操作可能无法执行 foreach(var item in selectedNode.Childrens) { if(item.ProjectItem.FileName == fileName) { item.RemoveNode(); } } 错误原因 通常,.Net集合不支持 阅读全文
posted @ 2022-07-01 16:38 羽小兮 阅读(1177) 评论(0) 推荐(0)
摘要: 从可编辑的ComboBox获取TextChanged事件: xmal: <ComboBox Width="100" Name="SFRName" IsEditable="True" IsTextSearchEnabled = "true" TextBoxBase.TextChanged="SFRNa 阅读全文
posted @ 2022-06-24 08:50 羽小兮 阅读(1164) 评论(0) 推荐(0)
摘要: #include <stdio.h> void BubbleSort(int arr[], int length); int main() { printf("*******排序算法*******\n") ; while(1) { printf("输入数字:") ; int i,n=0,a[n]; 阅读全文
posted @ 2022-06-24 08:50 羽小兮 阅读(47) 评论(0) 推荐(0)
摘要: 背景:为了不向朋友问出中午去哪吃这种尴尬问题。。。。。。。 c语言代码 #include <stdio.h> #include <stdlib.h> //<stdlib.h>用于调用 rand(), #include <time.h> //声明time 时间不可逆转一直在变 #include <Wi 阅读全文
posted @ 2022-06-24 08:50 羽小兮 阅读(323) 评论(0) 推荐(0)
摘要: <DataGrid.Resources> <Style TargetType="DataGridCell"> <Style.Resources> <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrus 阅读全文
posted @ 2022-06-24 08:50 羽小兮 阅读(143) 评论(0) 推荐(0)