.Net 2.0
.NET (Core and Framework)
1
Posts
1
Posters
0
Views
1
Watching
-
Dear all, can any body explain the code snippet give below. [WebMethod] [SoapDocumentMethod(ResponseElementName = "StockQuotes")] [return: XmlElement("StockQuote")] public List StockQuoteRequest([XmlArray(IsNullable = true), XmlArrayItem("Symbol", IsNullable = false)] string[] symbols) { List quotes = new List(); foreach (String symbol in symbols) { StockQuote quote = new StockQuote(); quote.Symbol = symbol; if (symbol == "FABRIKAM") { quote.Name = "Fabrikam, Inc."; quote.Last = 120.00; quote.PreviousChange = 5.5; } else { quote.Name = "Contoso Corp."; quote.Last = 50.07; quote.PreviousChange = 1.15; } quotes.Add(quote); } return quotes; } Thanx in advance.
Ramesh.Kanjinghat