2013年4月26日

第十节 运算符和表达式(三)

摘要: 一。隐式转换,任何整数类型都能够隐式的转换为任何浮点型。注:整数转化为浮点型在某些情况下会有一定的精度损失。所有的整形都可以隐式转化为所有的实型(浮点型); class Program { static void Main(string[] args) { short s = 5000; int n; n = s;//隐式转换 Console.WriteLine(n); int s1 = 5000; short n1 = (... 阅读全文

posted @ 2013-04-26 23:30 杨柳清枫2012 阅读(142) 评论(0) 推荐(0)

第九节 运算符和表达式(二)

摘要: 一。自增运算符和自减运算符。++,--后置:先使用,后自身自增。前置:先自身自增,后使用。自增,自减,1.用于变量。2.不能用作表达式。 class Program { static void Main(string[] args) { int day = 12; int today; today = day++; Console.WriteLine("today={0}day={1}",today,day); } } 二.赋值运算符.=,+=,... 阅读全文

posted @ 2013-04-26 22:31 杨柳清枫2012 阅读(126) 评论(0) 推荐(0)

第八节 运算符和表达式

摘要: 先来看下吉姆拉尔森公式求星期几的问题。这里面包含了多种运算符using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace yunsuanfu{ class Program { static void Main(string[] args) { int y=2008; int m=8; int d=8; int week=(d+2*m+3*(m+1)... 阅读全文

posted @ 2013-04-26 21:51 杨柳清枫2012 阅读(165) 评论(0) 推荐(0)

RichTextBox控件

摘要: 4、RichTextBox控件 RichTextBox是一种既可以输入文本、 又可以编辑文本的文字处理控件, 与TextBox控件相比, RichTextBox控件的文字处理功能更加丰富, 不仅可以设定文字的颜色、 字体, 还具有字符串检索功能。 另外, RichTextBox控件还可以打开、编辑和... 阅读全文

posted @ 2013-04-26 16:27 杨柳清枫2012 阅读(512) 评论(0) 推荐(0)

TextBox 控件

摘要: 1、主要属性:(1)Text属性:Text属性是文本框最重要的属性,因为要显示的文本就包含在Text属性中。默认情况下,最多可在一个文本框中输入2048个字符。如果将MultiLine属性设置为true,则最多可输入32KB 的文本。Text属性可以在设计时使用【属性】窗口设置,也可以在运行时用代码... 阅读全文

posted @ 2013-04-26 10:28 杨柳清枫2012 阅读(481) 评论(0) 推荐(0)

导航