C# 不同类型数组之间的转换
string[] strArray = "a,b,c,d,e,f,g".Split(new char[]{ ',' }); int[] intArray; //C# 3.0下用此句 intArray = Array.ConvertAll(strArray, s => int.Parse(s)); //2.0下用以下的语句替换上例。 //intArray = Array.C …… 阅读全文
string[] strArray = "a,b,c,d,e,f,g".Split(new char[]{ ',' }); int[] intArray; //C# 3.0下用此句 intArray = Array.ConvertAll(strArray, s => int.Parse(s)); //2.0下用以下的语句替换上例。 //intArray = Array.C …… 阅读全文
1、要连接MySql数据库必须首先下载MySql官方的连接.net的文件,文件下载地址为http://dev.mysql.com/downloads/connector/net/6.6.html#downloads ,下载平台选择.Net&Mono,下载ZIP免安装版。2、解压缩刚才下载的mysql-connector-net-6.6.6-noinstall.zip文件,里面有几个版本选择,在这 …… 阅读全文
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;namespace ConsoleApplication1{ class Program { private static int Task(in …… 阅读全文
using System;using System.Threading;public class ThreadTest{ static double number1 = -1; static double number2 = -1; public static void Main() { int maxThreadNum, portThread …… 阅读全文
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;namespace Demon{ class Program { private static object obj1 = new object( …… 阅读全文
using System;using System.Text;using System.Collections.Generic;using System.Linq;using System.IO;namespace test{ class Program { public int Length; public string Path = …… 阅读全文
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace test{ class Node //链表节点 { public string data; public Node next; } …… 阅读全文
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace test{ class Program { public int j; public void A() { int j …… 阅读全文