C# 4.0 有人能修复这个09323e34232的错误吗
//cs\u关键字\u显式\u临时cs 使用制度; 摄氏度 { 公共摄氏度(浮动温度) { 度=温度C# 4.0 有人能修复这个09323e34232的错误吗,c#-4.0,C# 4.0,//cs\u关键字\u显式\u临时cs 使用制度; 摄氏度 { 公共摄氏度(浮动温度) { 度=温度 } public static explicit operator Fahrenheit(Celcius C) { return new Fahrenheit((9.0 / 5.0f) * C.degrees + 32); } public float Degrees { get { return Degrees; } } private float degrees; }
}
public static explicit operator Fahrenheit(Celcius C)
{
return new Fahrenheit((9.0 / 5.0f) * C.degrees + 32);
}
public float Degrees
{
get { return Degrees; }
}
private float degrees;
}
华氏级
{
公共华氏温度(浮动温度)
{
度=温度
}
public static explicit operator Celsius(Fahrenheit f)
{
return new Celsius((5.0 / 9.0f) * (f.degrees - 32));
}
public float Degrees
{
get { return Degrees; }
}
private float degrees;
}
//任何人都可以修复该漏洞欢迎来到Stack Overflow。问题中包含的只是您的代码。请阅读,然后编辑您的问题以格式化您的代码并提供更多信息。您请求帮助修复“漏洞”,但您没有告诉我们有关该漏洞的任何信息。这是家庭作业吗?
class Mainclass
{
static void Main()
{
Fahrenheit f = new Fahrenheit(100.0f);
Console.WriteLine("{0} fahrenhight", f.Degrees);
Celsius c = (Celsius)f;
Console.WriteLine("= {0} celsius", c.Degrees);
Fahrenheit f2 = (Fahrenheit) c;
Console.WriteLine("= {0} fahrenheit", f2.Degrees);
}
}