.
Grasshopper 0.8.0001 is now available for download.
http://www.grasshopper3d.com/page/next-build
.
Grasshopper 0.8.0001
11/17/2010 | 0 意見
標籤: grasshopper
UsingEnum
使用軟體: Visual c# 2008 Express
----------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class UsingEnum
{
enum WeekDay
{
sun = 1,
mon = 2,
tue = 3,
wed = 4,
thi = 5,
fri = 6,
sat = 7
}
static void Main()
{
Console.WriteLine("星期日為一周的第{0}天!!", (int)WeekDay.sun);
Console.WriteLine("星期一為一周的第{0}天!!", (int)WeekDay.mon);
Console.WriteLine("星期二為一周的第{0}天!!", (int)WeekDay.tue);
Console.WriteLine("星期三為一周的第{0}天!!", (int)WeekDay.wed);
Console.WriteLine("星期四為一周的第{0}天!!", (int)WeekDay.thi);
Console.WriteLine("星期五為一周的第{0}天!!", (int)WeekDay.fri);
Console.WriteLine("星期六為一周的第{0}天!!", (int)WeekDay.sat);
Console.ReadLine();
}
}
}
conversion
使用軟體: Visual c# 2008 Express
-----------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class conversion
{
static void Main(string[] args)
{
int a = 10;
double b = 0;
b = a;
b = 20.5;
a = (int)b;
Console.WriteLine("a = " + a);
Console.WriteLine("b = " + b);
float c = 20;
c = 20.5f;
c = (float)20.5;
Console.WriteLine("c = " + c);
char d = (char)65;
Console.WriteLine("d = " + d);
Console.ReadLine();
}
}
}
UsingFloatPoint2
使用軟體: Visual c# 2008 Express
-------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class UsingFloatPoint2
{
static void Main(string[] args)
{
char theChar1 = 'a';
char theChar2 = '文';
char theChar3 = '\x0059';
char theChar4 = '\u0058';
char theChar5 = '\a'; //鬧鐘(警示)\u0007
char theChar6 = '\b'; //退格鍵\u0008
char theChar7 = '\t'; //水平tab定位鍵\u0009
char theChar8 = '\r'; //換行字元\u000D
char theChar9 = '\v'; //垂直tab定位鍵\u000B
char theChar10 = '\f'; //換頁\u000C
char theChar11 = '\n'; //換行\u000A
char theChar12 = '\'';
//
Console.WriteLine(theChar1);
Console.WriteLine(theChar2);
Console.WriteLine(theChar3);
Console.WriteLine(theChar4);
Console.WriteLine(theChar5);
Console.WriteLine(theChar6);
Console.WriteLine(theChar7);
Console.WriteLine(theChar8);
Console.WriteLine(theChar9);
Console.WriteLine(theChar10);
Console.WriteLine(theChar11);
Console.WriteLine(theChar12);
//
Console.ReadLine();
}
}
}




