Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Conversion from C# to VB.NET
Message
De
19/04/2013 09:19:05
 
 
À
19/04/2013 08:56:27
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01571173
Message ID:
01571473
Vues:
46
Let me give an example of what is happening.

Array.Resize() returns another object - the original array continues to exist for as long as it is referenced
	public class AClass
	{
		public static string[] Tables = { "one", "two", "three" };

		public static void Main()
		{
			string[] tables = Tables;

			Array.Resize<string>(ref Tables, 10);

			Console.WriteLine("previous version contains {0} elements", tables.Length);  // 3
			Console.WriteLine("newer version contains {0} elements", Tables.Length);  //10
			Console.ReadLine();
		}

	}
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform