using System;
using System.Collections.Generic;
using System.Text;namespace test
{
struct circle
{
public int x, y;//圆的圆心
public int radius;//圆的半径
public circle (int a, int b, int r);
{
x= a;
y=b ;
radius=r;
}
}
class program
{
public static void Main(string[] args)
{
circle mycircle;
//circle mycircle = new circle(20, 20, 300);
mycircle .x=20;
mycircle .y=20;
mycircle .radius=300;
Console .WriteLine ("My Circle:");
Console .WriteLine ("x={0},y={1},radius={2}",mycircle.x, mycircle.y,mycircle.radius); }
}
}
错误 1 类、结构或接口成员声明中的标记“=”无效
\Program.cs 14 16
错误 2 类、结构或接口成员声明中的标记“;”无效
\Program.cs 14 19
错误 3 类、结构或接口成员声明中的标记“=”无效
\Program.cs 15 16
错误 4 类、结构或接口成员声明中的标记“;”无效
\Program.cs 15 19
错误 5 类、结构或接口成员声明中的标记“=”无效
\Program.cs 16 20
错误 6 类、结构或接口成员声明中的标记“;”无效
\Program.cs 16 22
using System.Collections.Generic;
using System.Text;namespace test
{
struct circle
{
public int x, y;//圆的圆心
public int radius;//圆的半径
public circle (int a, int b, int r);
{
x= a;
y=b ;
radius=r;
}
}
class program
{
public static void Main(string[] args)
{
circle mycircle;
//circle mycircle = new circle(20, 20, 300);
mycircle .x=20;
mycircle .y=20;
mycircle .radius=300;
Console .WriteLine ("My Circle:");
Console .WriteLine ("x={0},y={1},radius={2}",mycircle.x, mycircle.y,mycircle.radius); }
}
}
错误 1 类、结构或接口成员声明中的标记“=”无效
\Program.cs 14 16
错误 2 类、结构或接口成员声明中的标记“;”无效
\Program.cs 14 19
错误 3 类、结构或接口成员声明中的标记“=”无效
\Program.cs 15 16
错误 4 类、结构或接口成员声明中的标记“;”无效
\Program.cs 15 19
错误 5 类、结构或接口成员声明中的标记“=”无效
\Program.cs 16 20
错误 6 类、结构或接口成员声明中的标记“;”无效
\Program.cs 16 22
解决方案 »
- 一个非常诡异的问题,.net执行存储过程特别慢
- 如何利用SSH实现对linux的远程连接
- 向字典中添加结构体为什么性能这么差?
- C#Winform中的DataGridView控件中导出至Excel如何对列值进行合计
- vs20005 解决方案下面添加的项目 不能改默认命名空间,提示:根命名空间的字符串必须是有效的标识符
- WebResponse.GetResponse() .NET 3.5下尝试自动重定向的次数太多?.NET 4.0完全正常。为什么?
- 请问 System.Diagnostics.Process.Start打开网页。
- 各位大侠,请问如何调用子窗体的一些变量啊?
- 大家讨论一下WinForm + WebServices开发数据库应用系统
- 一个小问题
- 如何获取一个文档(word,excel)的数字摘要
- C#怎么返回类型,
你这个 点 前面怎么还有空格
{
x= a;
y=b ;
radius=r;
}
}
这边有问题。不知道是什么问题
你在定义public circle (int a, int b, int r) ;
把红色的去掉
去掉最后的分号