Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help to translate this function from C# to VB
Message
De
11/04/2009 16:22:01
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Help to translate this function from C# to VB
Divers
Thread ID:
01394360
Message ID:
01394360
Vues:
86
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();
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform