摘要: C# Parse 方法用于将字符串类型转换成任意类型,具体的语法形式如下。 数据类型 变量 = 数据类型.Parse(字符串类型的值); 这里要求等号左、右两边的数据类型兼容。 int num1 = int.Parse(Console.ReadLine()); int num2 = int.Pars 阅读全文
posted @ 2019-12-23 14:15 highlightyys 阅读(54) 评论(0) 推荐(0)
摘要: class Program { static void Main(string[] args) { string str = Console.ReadLine(); str = str.Insert(1, "@@@"); Console.WriteLine("新字符串为:" + str); } } 阅读全文
posted @ 2019-12-23 13:40 highlightyys 阅读(661) 评论(0) 推荐(0)
摘要: class Program { static void Main(string[] args) { string str = Console.ReadLine(); int firstIndex = str.IndexOf("@"); int lastIndex = str.LastIndexOf( 阅读全文
posted @ 2019-12-23 13:38 highlightyys 阅读(61) 评论(0) 推荐(0)
摘要: class Program { static void Main(string[] args) { string str = Console.ReadLine(); if (str.IndexOf(",") != -1) { str = str.Replace(",", "_"); } Consol 阅读全文
posted @ 2019-12-23 10:12 highlightyys 阅读(70) 评论(0) 推荐(0)
摘要: 使用 IndexOf 方法查找第一个 @ 出现的位置与使用 LastlndexOf 方法查找 @ 在字符串中最后一次出现的位置相同即可 class Program { static void Main(string[] args) { string str = Console.ReadLine(); 阅读全文
posted @ 2019-12-23 10:09 highlightyys 阅读(25) 评论(0) 推荐(0)
摘要: HSSFWorkbook:是操作Excel2003以前(包括2003)的版本,扩展名是.xls XSSFWorkbook:是操作Excel2007的版本,扩展名是.xlsx 下述对象对excel2013等文件不适用,但基本的方法是一样的,可以借鉴 后续代码均是XSSFWorkbook对象 工作本HS 阅读全文
posted @ 2019-10-10 15:44 highlightyys 阅读(272) 评论(0) 推荐(0)
摘要: protected void Page_Load(object sender, EventArgs e) { //1.读取excel数据,存入list中 List<User> list = new List<User>(); //读取文件 using (FileStream stream = new 阅读全文
posted @ 2019-10-08 13:33 highlightyys 阅读(31) 评论(0) 推荐(0)
摘要: using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.U 阅读全文
posted @ 2019-09-27 17:59 highlightyys 阅读(15) 评论(0) 推荐(0)
摘要: https://www.cnblogs.com/William-1234/p/4533905.html 一,IIS 1.首先知道IIS是个什么东西:它是web服务器软件,安装在服务器上,接受客户端发来的请求,并传送给服务器端,然后响应请求并送回给客户端。类似于饭店里的服务员。 2.会安装IIS——控 阅读全文
posted @ 2019-09-27 17:49 highlightyys 阅读(20) 评论(0) 推荐(0)
摘要: 参考: https://www.cnblogs.com/wolfocme110/p/3881039.html https://blog.csdn.net/qq_41953178/article/details/94615692 <Window x:Class="WpfApp3.MainWindow" 阅读全文
posted @ 2019-09-27 09:34 highlightyys 阅读(31) 评论(0) 推荐(0)