csharpclass.cs
来自「《CSDN 开发高手》2004年第6期」· CS 代码 · 共 38 行
CS
38 行
using System;
using System.Windows.Forms;
namespace CSharpClassNameSpace
{
/// <summary>
/// CSharpClass 的摘要说明。
/// </summary>
public class CSharpClass
{
public CSharpClass()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
public void SaySomething(string str)
{
MessageBox.Show(" 这是 C#实现的功能,传入的字串是:"+str);
}
}
public interface IMyShape
{
double Area();
}
public class CSharpRect :IMyShape
{
public float width;
public float height;
public double Area()
{
return width*height;
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?