2011年8月12日

C#String.PadLeft函数,文本对齐以及填补解决方案

摘要: 由于很多时候我们需要把数据进行格式化,方便各个系统之间通信和数据交互,因此难免会经常让人位数不够而进行位数相应数据填充。比如,你希望获取的是7位的2进制数据格式,而2进制数据格式,都是以0,1都为数据信号的,只有1,0两数据格式,刚我说的是7位,相当于如下:1000101格式,如果,我的数据是101三个长度的2进制数据,但我想返回一个新的并且具有固定长度,位数不够填充0的做法。string SourceStr="101";string DestinationStr;DestinationStr=String.PadLeft(7,"0");Console. 阅读全文

posted @ 2011-08-12 14:53 cjerych 阅读(429) 评论(0) 推荐(0)

Working with the RadioButton and CheclBox controls

摘要: The Follow exercise will give you a first look at eh RadioButton and CheckBox controls. You will build a simple survey.1. create a new silverlight application in visual studio and call it CheckBoxRadioButton. allow visual sutdio to create a web application project to host the application.2. in the m 阅读全文

posted @ 2011-08-12 14:51 cjerych 阅读(317) 评论(0) 推荐(0)

Working with the TextBox Control In Silverlight 4.0

摘要: This exercise demostrates the use of the TextBox control in Silverlight by creating a simple application that will request the red,green,and blue values to fill an ellipse with a given color. The resulting application will appear as shown below.Here is the codes.1. In Visual Studio, create a new Sil 阅读全文

posted @ 2011-08-12 14:00 cjerych 阅读(247) 评论(0) 推荐(1)

导航