class1.cs
来自「这是.net2005学习不可缺少的教程」· CS 代码 · 共 45 行
CS
45 行
using System;
namespace Indexer
{
/// <summary>
/// Class1 的摘要说明。
/// </summary>
class Class1
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main(string[] args)
{
//
// TODO: 在此处添加代码以启动应用程序
//
Vector v = new Vector();
//v.x = 1; v.y = 2; v.z = 3;
v[0] = 1; v[1] = 2; v[2] = 3;
v["x"] = 1; v["y"] = 2; v["z"] = 3;
Vector v1 = new Vector();
Vector v2 = new Vector();
v1[0] = 1; v1[1] = 2; v1[2] = 3;
v2[0] = 1; v2[1] = 2; v2[2] = 3;
Vector v3 = v1 + v2;
Console.WriteLine(v3);
//Rational r=new Rational(1);
//int i=r.ToInt32();
//Rational r=1;
//int i=(Int32)r;
//Console.WriteLine(i);
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?