Visual Basic Datatype Conversion
Like C#, Visual Basic is a typed language. C# and Visual Basic have a lot in common, but there are many differences as well. The Flash gateway on the server takes care of the datatype conversions back and forth between the Flash client and the ASP.NET server.
Table A-7 shows the conversion from Flash ActionScript to Visual Basic.
Flash (ActionScript) |
Visual Basic |
ActionScript object |
flashgateway.IO.ASObject (implements java.util.map) |
Array (indexed) |
System.Collections.ArrayList |
Array (associative) |
System.Collections.HashMap |
Boolean |
Boolean |
Date object |
Date |
Number |
any numeric type |
RecordSet |
- |
String |
System.String |
Undefined |
Nothing |
XML Object |
System.Xml.XmlDocument |
Null |
Nothing |
Table A-8 shows the conversion from Visual Basic to Flash ActionScript.
Visual Basic |
Flash (ActionScript) |
FlashGateway.IO.ASObject |
ActionScript object |
FlashGateway.IO.ASObject with |
ActionScript object of that type |
System.Collections.ICollection, object[] |
Array (indexed) |
System.Collections.HashTable, System.Collections.IDictionary |
Array (associative) |
Boolean |
Boolean |
Date |
Date object |
Number |
Number |
System.Data.DataSet |
Array of RecordSets |
System.Data.DataTable |
RecordSet |
System.String, System.Char |
String |
System.Xml.XmlDocument |
XML object |
Nothing |
Null |
Get Flash Remoting: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.