随笔分类 -  C#

C#的基础
摘要:1 class Program 2 { 3 static void Main(string[] args) 4 { 5 IndexClass names = new IndexClass(); 6 names... 阅读全文
posted @ 2015-12-29 17:07 南潇湘 阅读(287) 评论(0) 推荐(0)
摘要:1.所有的switch 都可以用if 替换,但所有的if不一定能被switch替换2.:switch case直接跳到对应的case值里面执行相应代码。而if语句会执行一条一条判断语句,直到匹配到对应的值。这么看来switch case比if执行效果高。但是由于if判断语句的简单易用。很多地方简单的... 阅读全文
posted @ 2015-12-29 13:35 南潇湘 阅读(340) 评论(0) 推荐(0)
摘要:1,创建webservice服务器端搭建网站,创建webservicewebservice.cs中的代码namespace WebApplication1{ /// /// WebService1 的摘要说明 /// [WebService(Namespace = "ht... 阅读全文
posted @ 2015-12-25 21:17 南潇湘 阅读(333) 评论(0) 推荐(0)
摘要:public static UserSession GetUserSession(HttpRequestBase request) { try { SougeWebService.UserVerificationWebService webserver = new SouGeForum.SougeWebService.UserVerificationWebService(); if (webserver.CookieContainer == null) ... 阅读全文
posted @ 2013-04-02 13:28 南潇湘 阅读(618) 评论(2) 推荐(1)
摘要:原文链接http://blog.sina.com.cn/s/blog_5d2ef8320100fcar.html 如果Page指令的AutoEventWireup属性被设置为 true(或者如果缺少此属性,因为它默认为true),该页框架将自动调用页事件,即Page_Init 和Page_Load方法。在这种情况下,不需要任何显式的Handles子句或委托。 在Web服务器控件中,某些事件(通常是Click事件)会导致窗体被回发到服务器。HTML 服务器控件和Web服务器控件(如TextBox控件)中的更改事件将被捕获,但不会立即导致发送。相反,它们会被该控件缓存,直到发送再次发生时为止。然后 阅读全文
posted @ 2013-02-16 14:48 南潇湘 阅读(372) 评论(0) 推荐(0)
摘要:http://blog.csdn.net/chenli985/article/details/5247416using System;using System.Threading;public class arr{public static void Main(){//int[] arr; //arr = new int[5];int luzi;for(luzi=1;luzi<10000;luzi++){Console.WriteLine("第"+luzi+"行");if (luzi==5000){Thread.Sleep(10000);}}}}第 阅读全文
posted @ 2013-01-19 11:13 南潇湘 阅读(295) 评论(0) 推荐(0)
摘要:/// /// 视频播放器(支持avi,wmv,asf,mov,rm,ra,ram),前台使用 /// /// 视频文件路径 /// 播放器显示宽度 /// 播放器显示高度 /// 播放器内容 public static string SelPlay(string strUrl, int str... 阅读全文
posted @ 2012-09-26 11:07 南潇湘 阅读(235) 评论(1) 推荐(0)