它在给定方法中插入的内容 [英] what it insert in given method

查看:71
本文介绍了它在给定方法中插入的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很困惑.在给定的代码中,我使用了getprice方法来获取名为price的字符串的值.
有人可以告诉我我需要在此方法中插入什么吗?我已经使用了退货价格;但它没有做出任何回应. fxfeed是提供出价和要价的市场价值的类,但是该方法无法获取价值.请帮帮我.

I have a confusion. in the given code i have used getprice method to get the values of a string named price.
Can some body tell me what i need to insert in this method. i have used return price; but it didnt give any respons. the fxfeed is a class that provides market values of bid and ask but the method doesnt work to get the values. please help me.

public  string price = "bid,ask";
public string getPrice()
{
}
if (fxfeed.getPrice().Equals("bid,ask"))
{
	Response.Write("Bid: " + quote["bid"]);
	Response.Write("Ask: " + quote["ask"]);
}
else
{
	Response.Write(("Price: " + quote["price"]));
}

推荐答案

没有看到fxfeed.GetPrice所做的任何事情,我唯一能想到的是,您丢弃了它返回的所有内容.要么,要么fxfeed 在调用实例的内部数据时对它们的实例内部数据进行了一些非OOP处理.

如果fxfeed.GetPrice返回价格,那么在开始查看quote 数组内容之前,将它们存储在某个位置是明智的.

如果没有,那么什么会影响quote array的内容,以及如何影响?
Without seeing whatever it is that fxfeed.GetPrice does, the only thing I can assume is that you are throwing away whatever it does return. Either that, or fxfeed does some seriously non-OOP playing with your instances internal data when you call it''s methods.

If fxfeed.GetPrice returns the prices, then it would be sensible to store them somewhere, before you start looking at your quote array content.

If it doesn''t, then what does affect the quote array content, and how?


这篇关于它在给定方法中插入的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆