public struct STONES
{
public int x;
public int y;
};
public struct Lines
{
public STONES[] Point = new STONES[2];//错误
public int[] items= new int[6];//错误
public int value;
public int color;
};
阅读全部
|
dreamingost
贴于 2014年3月2日 15:16
hide
bbsi
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace cjt2
{
class Program
{
static void Main(string[] args)
{
......................
阅读全部
|
wp231957
贴于 2014年2月21日 19:26
hide
bbsi
using System;
Public class Exe1 {
Public static void Main ()
{
Int x,y,z;
bool s;
x=y=z=0;
S=x++!=0 || ++y!=0 && ++y!=0 ;
Console.WriteLine(“x={0},y={1},z={2},s={3}”, x,y,z,s);
Console.Read();
}
}
阅读全部
|
思君黯然
贴于 2014年1月2日 12:22
hide
bbsi
//判断缓存
if (HttpRuntime.Cache["RoomClassList"] == null)
{
List<RoomClass_V2> obj = _dal.GetPageList();
HttpRuntime.Cache.Insert("RoomClassList", obj, null, DateTime.Now.AddDays(1), System.Web.Caching.Cache.NoSlidingExpiration);
return HttpRuntime.Cache["RoomClassList"];
}
else
{
return HttpRuntime.Cache["RoomClassList"];
}
阅读全部
|
默夜鳞
贴于 2013年12月6日 10:24
hide
bbsi
求翻译以下c#代码,谢谢!
string hdcontrolurl = "http://tc.hd.xiaomi.com/hdget?callback=hdcontrol";
request = WebRequest.Create(hdcontrolurl) as HttpWebRequest;
request.CookieContainer = cookieContainer;
request.Method = "GET";
request.Host = "tc.hd.xiaomi.com";
request.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.62 Safari/537.36";
response = (HttpWebResponse)request.GetResponse();
Stream instream = response.GetResponseStream();
sr = new StreamReader(instream, encoding);
content = sr.ReadToEnd();
......................
阅读全部
|
LGPLGP
贴于 2013年10月18日 23:00
hide
bbsi
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
serialPort1.PortName = "COM1";
serialPort1.BaudRate = 9600;
serialPort1.Open();
......................
阅读全部
|
骨子里的认真
贴于 2013年9月27日 17:51
hide
bbsi
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
serialPort1.PortName = "COM1";
serialPort1.BaudRate = 9600;
serialPort1.Open();
......................
阅读全部
|
骨子里的认真
贴于 2013年9月27日 17:51
hide
bbsi
#define N 200
#include <graphics.h>
#include <stdlib.h>
#include <dos.h>
#define LEFT 0x4b00
#define RIGHT 0x4d00
#define DOWN 0x5000
#define UP 0x4800
#define ESC 0x011b
int i,key;
int score=0;/*得分*/
int gamespeed=50000;/*游戏速度自己调整*/
......................
阅读全部
|
qazwhosqaz
贴于 2013年9月11日 16:42
hide
bbsi
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Collections;
using Microsoft.Win32;
......................
阅读全部
|
疾风长眠
贴于 2013年9月8日 10:38
hide
bbsi
private void button1_Click(object sender, EventArgs e)
{
string 用户名 = textBox1.Text;
string 密码 = textBox2.Text;
string connString = "server=; database = '班级学生考评系统'; uid = sa;password =";//连接字符串
SqlConnection connection = new SqlConnection(connString);//创建一个SqlConnection对象
string sql = string.Format(" select count(*) from [学生基本信息] where 用户名='{0}'and 密码='{1}'", 用户名,密码);// 格式化字符串,最大的好处 是: 有多个参数的时候,只在内存中分布一个字符串
try //异常处理语句
{
connection.Open();//打开connection对象,以实现对connection的进一步操作 SqlCommand command = new SqlCommand(sql, connection);//创建一个SqlCommand对象
int num = (int)command.ExecuteScalar();// 实现强制类型转换,用于执行返回当个结果值的SQL语句。, 是从数据库中查询结果集
if (num > 0)
......................
阅读全部
|
cyh173356813
贴于 2013年8月27日 21:09
hide
bbsi