- 博客(14)
- 资源 (3)
- 收藏
- 关注
原创 C#中extern的作用
C# extern 在方法声明中使用extern修饰符支持在外部实现方法。C# extern 在方法声明中使用extern修饰符支持在外部实现方法。外部修饰符的常见方法是在使用Interop 服务调入非托管代码时与 DllImport 属性一起使用;在这种情况下,该方法还必须声明为 static,如下面的示例所示:[DllImport("avifil32.dll")]
2017-05-23 14:26:04 7067
原创 Web编程模式重点
Web编程模式不是事件驱动的编程模式,是请求响应模式。最终用户会产生发送请求。Form标签是HTML中产生请求的一种方式,Form标签内部的提交按钮只要一被点击,请求会被发送到相关的action 属性。
2017-05-19 14:43:39 241
原创 C# 怎样通过ip和端口向一台设备发送指令
using System;using System.Collections.Generic;using System.Text;using System.Net;using System.Net.Sockets;namespace Client{ class Program { static void Main(string[] arg
2017-05-16 16:21:01 5941 1
原创 C#获取本机IP地址,测试IP地址是否能够Ping通
利用C# 获取本机IP地址并且测试IP地址是否能够Ping通 static void Main(string[] args) { string hostName = Dns.GetHostName();//本机名 IPAddress[] ipHost = Dns.GetHostAddresses(hostN
2017-05-16 15:14:03 1831
原创 Excel数据导出
private void button2_Click(object sender, EventArgs e) { //新建excel程序对象 Microsoft.Office.Interop.Excel.Application excel = new Microsoft.Office.In
2017-05-15 17:14:25 257
原创 Excel数据导入
private void button3_Click(object sender, EventArgs e) { string filename = ""; //打开导入EXCEl文件,获取文件名 if (openFileDialog1.ShowDialog() == DialogResult.OK)
2017-05-15 17:12:55 220
原创 SQL查询字符串中某一个字出现的次数
算出来“F”在“ABFJFKLFPOFWS'”里面出现的次数: declare @s varchar(100)set @s ='ABFJFKLFPOFWS'select len(@s) - len(replace(@s,'F','')) c_count
2017-05-15 16:15:34 6185
原创 插入排序
public static int[] Arr() { Random ran = new Random(); int[] arr = new int[10]; for (int i = 0; i { arr[i] = ran.Next(1,
2017-05-15 13:28:06 181
原创 选择排序(从小到大)
public static int[] Arr() { Random ran = new Random(); int[] arr = new int[10]; for (int i = 0; i < arr.Length; i++) { arr
2017-05-15 12:32:53 537
原创 冒泡排序(从小到大)
public static void Maopao() { Random ran = new Random(); int[] arr = new int[10]; for (int i = 0; i <arr.Length; i++) { ar
2017-05-15 11:02:59 1114
原创 Session的时间设置
Session的具体设置很简单,方法有三种: (1)在主页面或者公共页面中加入: session.setMaxInactiveInterval(900); 参数900单位是秒,即在没有活动15分钟后,session将失效。设置为-1将永不关闭。 这里要注意这个sess
2017-05-15 09:49:55 509
原创 翻转字符串
void Main(){ string str="this";ShowAppleA(str).Dump();}public string ShowAppleA(string str){ return string.Join(" ",str.Reverse());}结果:
2017-05-07 15:05:23 181
原创 编写方法,输出给定日期所在月份的第一天和最后一天
void Main(){DateTime dt=DateTime.Now;ShowMonthInfo(dt);}public void ShowMonthInfo(DateTime dt){var begin = new DateTime(dt.Year,dt.Month,1);begin.Dump();begin.AddMonths(1).AddDays(
2017-05-07 14:46:35 1429
jce-policy-8.zip
2023-04-18
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人