我在我的项目中创建了一个 C# 函数来比较价格。
public static decimal? SpecialPrice(decimal w, decimal p)
{
if (w < p)
{
return p;
}
else if (w > p && p > 0)
{
//return (w , p);
}
else
{
return w;
}
}
当w > p且p >0时,我希望能够返回两个变量(w和p),但我不知道如何这样返回。有人知道吗?
w
和p
作为输入和输出参数来处理。 - John Alexiou