Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help to translate this function from C# to VB
Message
From
11/04/2009 16:22:01
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Help to translate this function from C# to VB
Miscellaneous
Thread ID:
01394360
Message ID:
01394360
Views:
85
Hi
I study one example code .. and this example written on C#

I can't understand how to translate lins to Visual Basic :))
List<object> data = new List<object>();
data.Add(new{Id=id, Name = name});
Here is full source
        protected void CitiesRefresh(object sender, StoreRefreshDataEventArgs e)
        {
            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.Load(HttpContext.Current.Server.MapPath("Cities.xml"));
            List<object> data = new List<object>();

            foreach (XmlNode cityNode in xmlDoc.SelectNodes(string.Concat("countries/country[@code='", this.Countries.SelectedItem.Value, "']/city")))
            {
                string id = cityNode.SelectSingleNode("id").InnerText;
                string name = cityNode.SelectSingleNode("name").InnerText;

                data.Add(new{Id=id, Name = name});
            }
            this.CitiesStore.DataSource = data;

            this.CitiesStore.DataBind();
Next
Reply
Map
View

Click here to load this message in the networking platform