Want to build the ChatGPT based Apps? Start here
Become a member
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
Michelle Oratil
2.2k
1
992
Accessing array elements with dynamic size
Nov 19 2013 3:56 AM
Hi,
So I have an array named
Services[]
which is a return from a web service method.
I want to access its elements. Currently I have:
Services[] x = new Services[5];
x = getServicesLibrary();
for (int i = 0; i < x.Length; i++)
{
label1.text = x[i].servicecode.ToString() + "->" + x[i].servicedesc.ToString() + " ");
}
and the result is:
1->Laboratory
I am getting the first element only. How can I get all the elements of the array?
And also, is it possible to declare a dynamic size of the array? Since it is coming form a web service, I am assuming that the ServiceLibrary will expand.
Thank you so much!
Reply
Answers (
2
)
how to call sql server store procedure in classic asp
Monitor already running application using my applicaton