C#发牌
之前不太喜欢C#,无意中发现linq,用来实现排序是如此简单,所以又用C#写了遍发牌程序
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
//IEnumerable<string> expr = from s in cards
// where s.Length == 5
// orderby s
// select s.ToUpper();
//foreach (string item in expr)
//Console.WriteLine(item);
//Console.ReadKey();
Program o = new Program();
List<string> cards = o.newCards();
o.exchangeCards(30, cards);
List<List<string>> all = o.dispatchCards(6, ca
相关文档:
xml文件:
<?xml version="1.0" encoding="utf-8" ?>
<bookstore>
<book>
<title lang="eng">Harry Potter</title>
<price>29.99</price>
</book>
<book>
......
Internet 类
using System;
using System.Collections.Generic;
using System.Collections;
using System.Text;
using System.Net;
using System.IO;
using System.Text.RegularExpressions;
using System.Threading;
namespace DownData
{
class internet
{
&nb ......
public static class AccessHelper
{
//数据库连接字符串
//WebForm
//public static readonly string conn_str = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + HttpContext.Current.Request.PhysicalApplicationPath + System.Configuration.ConfigurationManager ......
首先需要在项目中添加(Microsoft XML, v3.0)的引用
using MSXML2;
private string VerifyNotifyURL(string URL)
{
MSXML2.XMLHTTPClass xmlhttp=new MSXML2.XMLHTTPClass();
try
{
&nbs ......
C#中操作Oracle时的SQL语句参数的用法
OracleTransaction myTrans ;
conn.Open();
myTrans =conn.BeginTransaction(IsolationLevel.ReadCommitted) ......