码迷,mamicode.com
首页 > 其他好文 > 详细

结构体

时间:2019-03-03 22:37:55      阅读:209      评论:0      收藏:0      [点我收藏+]

标签:col   point   ati   turn   static   math   ++   ret   span   

 1 using System;
 2 
 3 struct Point
 4 {
 5     public double x, y;
 6     
 7     public Point(int x, int y) {
 8         this.x = x;
 9         this.y = y;
10     }
11 
12     public double R(){
13         return Math.Sqrt(x*x+y*y);
14     }
15 }
16 
17 class Tes
18 {
19     static void Main() {
20         Point[] points = new Point[100];
21 
22         for (int i = 0; i < 100; i++)
23             points[i] = new Point(i, i*i);
24     }
25 }

 

结构体

标签:col   point   ati   turn   static   math   ++   ret   span   

原文地址:https://www.cnblogs.com/GoldenEllipsis/p/10467856.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!