c# 类
来源:互联网 发布:linux系统ls命令 编辑:程序博客网 时间:2024/06/06 05:51
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication4
{
class sayHello
{
double width;
double height;
public void getWidthAndHeight()
{
width = double.Parse(Console.ReadLine());
height = double.Parse(Console.ReadLine());
//return ;
}
public double haha()
{
return width * height;
}
}
class Program
{
static void Main(string[] args)
{
sayHello say = new sayHello();
say.getWidthAndHeight();
Console.WriteLine(say.haha());
Console.ReadKey();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication4
{
class sayHello
{
double width;
double height;
public void getWidthAndHeight()
{
width = double.Parse(Console.ReadLine());
height = double.Parse(Console.ReadLine());
//return ;
}
public double haha()
{
return width * height;
}
}
class Program
{
static void Main(string[] args)
{
sayHello say = new sayHello();
say.getWidthAndHeight();
Console.WriteLine(say.haha());
Console.ReadKey();
}
}
}
0 0
- C#类
- C#类
- C#类
- C#类
- c# 类
- C# 类
- c# 类
- c#类
- C#类
- C#类
- 浅谈C#抽象类和C#接口
- [C#基础]c#中的XmlSerializer类
- C#类的多态性(C#菜鸟篇)
- C#数据访问类
- C#数据访问类
- c#中的流类
- C#的MD5类
- C#类成员
- C# 判断文件是否存在和文件读写
- 做硬件产品经理的困惑
- It's All Star☆Right彡 歌词翻译
- STM32,CAN总线过滤器的设置详细讲解
- 写出高效的Bug测试报告的9点建议(51Testing)
- c# 类
- LINUX下GDB调试
- 【bzoj 1699】[Usaco2007 Jan]Balanced Lineup排队
- 浏览器内部工作原理
- 观察者模式在MVP中的应用
- Vue入门实战01:搭建webpack+vue开发环境
- 「学园孤岛」ED 翻译
- Qt / C++ 如何关闭外部进程
- 图片加载利器之Picasso(二)基本用法