A.3 C Datatype Conversion


A.3 C# Datatype Conversion

Unlike ActionScript 1.0, C# is a typed language. 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-5 shows the conversion from Flash ActionScript to C#.

Table A-5. Flash-to-C# datatype conversion

Flash (ActionScript)

C#

ActionScript object

flashgateway.IO.ASObject (implements java.util.map)

Array (indexed)

System.Collections.ArrayList

Array (associative)

System.Collections.HashMap

Boolean

System.Boolean

Date object

System.DateTime

Number

any numeric type

RecordSet

-

String

System.String

Undefined

Null

XML object

System.Xml.XmlDocument

Null

Null

Table A-6 shows the conversion from C# to Flash ActionScript.

Table A-6. C#-to-Flash datatype conversion

C#

Flash (ActionScript)

FlashGateway.IO.ASObject

ActionScript Object

FlashGateway.IO.ASObject with type property set

ActionScript Object of that type

System.Collections.ICollection, object[]

Array (indexed)

System.Collections.HashTable, System.Collections.IDictionary

Array (associative)

System.Boolean, bool

Boolean

System.DateTime

Date object

Number

Number

System.Data.DataSet

Array of RecordSets

System.Data.DataTable

RecordSet

System.String, System.Char

String

System.Xml.XmlDocument

XML Object

Null

Null



Flash Remoting
Flash Remoting: The Definitive Guide
ISBN: 059600401X
EAN: 2147483647
Year: 2003
Pages: 239
Authors: Tom Muck

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net