
1159
DEVELOPING
COLDFUSION 9 APPLICATIONS
Using Web Elements and External Objects
Las
t
upda
te
d 8/5/2010
Note:
You do not have to use a
JavaCast
function to convert ColdFusion string variables. They are automatically
converted to .NET System.String.
Create special objects for .NET primitive unsigned data types, such as byte (unsigned byte), ushort (unsigned short),
uint (unsigned int) and ulong (unsigned long), for which no corresponding java types exist. The following table lists
the .NET primitive types and the corresponding class you must use.
Use the
createObject
function or
cfobject
tag to create these special objects, in the same manner as you create
other .NET classes, before you use them in your assignment statement. For example, the following line creates a ushort
representation of the value 100:
<cfset boxedUShort = createObject(".NET". "System.BoxedUShort").init(100)>
The following example creates a System.Hashtable object and populates it with examples of all types of primitives.
int / System.Int32
int
int[] / System.Int32[]
int[]
long / System.Int64
long
long[] / System.Int64[]
long[]
sbyte / System.Sbyte
byte
sbyte []/ System.Sbyte[]
byte []
short / System.Int16
short
short[] / System.Int16[]
short[]
System.Decimal
bigdecimal
System.String
String
.NET type
Class used in cfobject/createObject
byte / System.Byte
System.BoxedByte
ushort / System.UInt16
System.BoxedUShort
uint / System.UInt32
System.BoxedUInt
ulong / System.UInt64
System.BoxedULong
Содержание COLDFUSION 9
Страница 1: ...Developing Applications ADOBE COLDFUSION 9...