日期:2014-05-18  浏览次数:20544 次

asp.net 调用asp的函数
在asp.net中怎么样调用asp中的函数呢?

------解决方案--------------------
class Sample
{
public static void Main()
{
sbyte sb1 = -16, sb2 = 16;
short sh1 = -15, sh2 = 15;
int in1 = -14, in2 = 14;
long lg1 = -13, lg2 = 13;
float fl1 = -12.0f, fl2 = 12.0f;
double db1 = -11.1, db2 = 11.1;
Decimal de1 = -10.0m, de2 = 10.0m;

Console.WriteLine();
Console.WriteLine( "SByte: 1) {0,-5} 2) {1,-5} ", Math.Abs(sb1), Math.Abs(sb2));
Console.WriteLine( "Int16: 1) {0,-5} 2) {1,-5} ", Math.Abs(sh1), Math.Abs(sh2));
Console.WriteLine( "Int32: 1) {0,-5} 2) {1,-5} ", Math.Abs(in1), Math.Abs(in2));
Console.WriteLine( "Int64: 1) {0,-5} 2) {1,-5} ", Math.Abs(lg1), Math.Abs(lg2));
Console.WriteLine( "Single: 1) {0,-5} 2) {1,-5} ", Math.Abs(fl1), Math.Abs(fl2));
Console.WriteLine( "Double: 1) {0,-5} 2) {1,-5} ", Math.Abs(db1), Math.Abs(db2));
Console.WriteLine( "Decimal: 1) {0,-5} 2) {1,-5} ", Math.Abs(de1), Math.Abs(de2));
}
}
/*
This example produces the following results:

SByte: 1) 16 2) 16
Int16: 1) 15 2) 15
Int32: 1) 14 2) 14
Int64: 1) 13 2) 13
Single: 1) 12 2) 12
Double: 1) 11.1 2) 11.1
Decimal: 1) 10.0 2) 10.0