如何从另一个类处理类[]的成员 [英] how to address member of a class[] from another class
问题描述
可能这个问题非常愚蠢 - 但是我现在找不到一天的解决方案..
Could be that this question is very silly - but I didn't find a solution for a day now..
探测:
班级请求有一个成员"号码" - 此字符串是搜索条件。
The class REQUEST has a member "Number" - this string is the search condition.
类 RESPONSE 具有成员"详细信息",其定义为数组类
INFOS [] 。在这个类中有变量,如 date,city,...
The class RESPONSE has the member "DetailedInformation", which is defined as a array class INFOS[]. In this class are variables like date, city, ...
函数应该是:
我在 Number 之后搜索,Web服务的响应应该显示变量
日期,城市,...
I search after a Number and the response of the web service should show me the variables date, city, ...
响应后的代码如何显示!?
How has the code after the response look like!?
感谢您的帮助..
wsClient client = new wsClient();
REQUEST request = new REQUEST();
request.Number = getNumberFromTextBox.Text;
INFOS resulttable = new INFOS();
resulttable.Number = getNumberFromTextBox.Text;
RESPONSE result = await client.wsAsync(request);
.
?
.
?
.
//not correct - only to Show that the web Service runs
OutputBlock.Text = String.Format(resulttable.Number);
推荐答案
您需要显示更多代码...但如果我猜它会看起来像:
you need to showmore code... but if i guess it will look somehting like:
foreach(var info in result){ // find the right one}
这篇关于如何从另一个类处理类[]的成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!