【C#】
我想去Berlin
这个作者很懒,什么都没留下…
展开
-
C# helloworld 0001
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace HelloWorld{ class Program { static void Main(string[] args)原创 2016-04-21 02:22:28 · 348 阅读 · 0 评论 -
C# structures 0011
Defining a Structureusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;struct Books{ public string title; public string author;原创 2016-04-21 21:04:49 · 365 阅读 · 0 评论 -
C# Substring 和 String.join 0010
String Contains String:using System;namespace StringApplication1{ class Program { static void Main(string[] args) { string str = "This is test"; if (str原创 2016-04-21 20:10:28 · 382 阅读 · 0 评论 -
C# 比较字符串是否相等 0009
using System;namespace StringApplication{ class Program { static void Main(String []args) { string str1 = "This is text"; string str2 = "This is test";原创 2016-04-21 17:16:11 · 600 阅读 · 0 评论 -
C# string 对象 0008
note:.NET C#中大写的String与小写的string的区别 如果用string,编译器会把它编译成String,所以如果直接用String就可以让编译器少做一点点工作,如果使用c#,建议使用string,比较符合规范。 string是关键字,String不是,也就是说string不能作为类、结构、枚举、字段、变量、方法、属性的名称,而String可以。 using原创 2016-04-21 16:59:14 · 282 阅读 · 0 评论 -
C# 方法使用 0007
FindMax number methodusing System;namespace CalculatorApplication{ class NumberManipulator { public int FindMax(int num1,int num2) { //local variable declaration原创 2016-04-21 16:29:56 · 280 阅读 · 0 评论 -
C# 访问控制符 0006
private variablesusing System;namespace RectangleApplication1{ class Rectangle { // member varible private double length; private double width; public void Acce原创 2016-04-21 14:19:35 · 525 阅读 · 0 评论 -
C# 圆的面积计算 0005
DeclaringConstantsusing System;namespace DeclaringConstants{ class Program { static void Main(string[] args) { const double pi = 3.1415926; // constant原创 2016-04-21 12:58:10 · 929 阅读 · 0 评论 -
C# double类型转换 0004
double类型转换using System;namespace TypeConversionApplication{ class Program { static void Main(string[] args) { double d = 12.54; int i;原创 2016-04-21 11:32:56 · 447 阅读 · 0 评论 -
C # int值大小 0003
using System;namespace DataTypeApplication{ class Program { static void Main(string[] args) { Console.WriteLine("size of int: {0}", sizeof(int)); Consol原创 2016-04-21 11:10:39 · 308 阅读 · 0 评论 -
C# 矩形面积 0002
using System;namespace RectangleApplication{ class Rectangle { // member variables double length; double width; double area; /* public void Acceptdetai原创 2016-04-21 03:20:49 · 673 阅读 · 0 评论 -
C# class示例 0012
Defining a Classusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace BoxApplication{ class Box { public double l原创 2016-04-22 05:18:53 · 426 阅读 · 0 评论