English 中文(简体)
价格变动
原标题:Convert from Price
  • 时间:2010-06-07 22:17:32
  •  标签:
  • c#-4.0

试图改变价格(从APIC(以下编码))。

public class Price
{
    public Price();
    public Price(double data);
    public Price(double data, int decimalPadding);
}

我想做的是,将这一亚特兰大的价格与两倍。 只是试图像我所希望的那样,把工作转为双亲。

Double bar = 21.75;
Price price = new Price();

if (Convert.ToDouble(price) >= bar) {
//code
}

当我尝试像这样的东西时,我认为它所说的价值必须低于无限。

我如何改变这一价格,以便能够加以比较?

最佳回答

<代码>Convert.ToDouble<>/code> 不能mag地转换Price<>/code>对一字表示反对,除非<代码>Price 执行 不可撤销

问题回答

你们在价格标本上需要一种财产,这种财产将翻一番,并作比较。





相关问题
Howto get started with C# 4.0 and .NET 4.0?

I don t want to download Visual Studio 2010. How can I start studying (not developing real applications) C# 4.0 and .NET 4.0 with just a text editor? Can I just download C# 4.0 compiler and .NET 4.0 ...

Mocking Framework with C# 4.0 Support?

Anybody know of a mocking framework that supports C# 4.0? Doesn t matter which one ATM, just need something that will work.

Unit Testing interface contracts in C#

Using the Code Contracts tools available in VS2010 Beta 2, I have defined an interface, a contract class for that interface and two classes that implement the interface. Now when I come to test the ...

How to Iterate Through Array in C# Across Multiple Calls

We have an application where we need to de-serialize some data from one stream into multiple objects. The Data array represents a number of messages of variable length packed together. There are no ...

IronPython ScriptRuntime equivalent to CPython PYTHONPATH

The following import works inside ipy.exe prompt but fails using IronPython ScriptRuntime inside a C# 4.0 program. import ConfigParser C# code: using System; using System.Collections.Generic; using ...

i cant understand the following code

Matrix<float> trainData2 = trainData.GetRows(intVar >> 1, intVar, 1); intVar is integer type... please help me to understand this code.

热门标签