由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
DotNet版 - Question: "-" operators: z= -x; z = x-y
相关主题
Is this FTP operation possible?没啥人气呀!
about ArrayListAdd Web Reference Questions
问一个Array Sort的问题.Net Thread question
请教:asp.net 如何使两个validation有顺序的执行[转载] Help! Question about Visual C#, thanks!
《C# 5.0 核心技术》第5版[PDF] (转载)Newbie Question about Debugging
Powershell dot sourcing question.[转载] .NET Interview Questions
大牛指教:新手List<>问题[转载] a socket Question
ASP.NET vNext (ASP.NET 5.0)MS SQL Report Server Questions
相关话题的讨论汇总
话题: question话题: operators话题: complex话题: operator话题: difference
进入DotNet版参与讨论
1 (共1页)
f******l
发帖数: 26
1
the operator "-" in
z= -x
and
z= x-y
are two different things, how to define them to make a difference?
f******l
发帖数: 26
2

found this: one operand or 2 operands will make the difference.
z= -x:
public operator-(Complex opr1)
{
return new Complex(-opr1.real, -opr1.imag);
}
public operator-(Complex opr1, Complex opr2)
{
return new Complex(opr1.real-opr2.real, opr1.imag-opr2.imag);
}

【在 f******l 的大作中提到】
: the operator "-" in
: z= -x
: and
: z= x-y
: are two different things, how to define them to make a difference?

1 (共1页)
进入DotNet版参与讨论
相关主题
MS SQL Report Server Questions《C# 5.0 核心技术》第5版[PDF] (转载)
a C# questionPowershell dot sourcing question.
Question about Nested Repeaters大牛指教:新手List<>问题
A Question about Session State in ASP.NETASP.NET vNext (ASP.NET 5.0)
Is this FTP operation possible?没啥人气呀!
about ArrayListAdd Web Reference Questions
问一个Array Sort的问题.Net Thread question
请教:asp.net 如何使两个validation有顺序的执行[转载] Help! Question about Visual C#, thanks!
相关话题的讨论汇总
话题: question话题: operators话题: complex话题: operator话题: difference