Home ASP.NET Hosting Dedicated Servers Contact Us
Announcements
Virtual Tiers
.NET Applications
XML Web Services
SQL Server Database
Web Traffic Statistics
Much More...
ASP.NET Web Site Hosting
Dedicated Servers
Windows 2003 Server
2.4 GHz Pentium 4
1024 MB RAM
80 GB Hard Drive
1000 GB/month
Fully Managed
Free Setup!
$268.00/month
Windows Dedicated Servers
Specialized Plans
10 or more Domains
Windows Services
Custom Plans
Windows Services
Learning & Support
About Us



ASP.NET Declare and Use Methods



Learn More about Server Intellect



ASP.NET Language Guide

C#

// Declare a void return function
void voidfunction() {
...
}
// Declare a function that returns a value
String stringfunction() {
...
return (String) val;
}
// Declare a function that takes and returns values
String parmfunction(String a, String b) {
...
return (String) (a + b);
}
// Use the Functions
voidfunction();
String s1 = stringfunction();
String s2 = parmfunction("Hello", "World!");

VB.NET

' Declare a void return function
Sub VoidFunction()
...
End Sub
' Declare a function that returns a value
Function StringFunction() As String
...
Return CStr(val)
End Function
' Declare a function that takes and returns values
Function ParmFunction(a As String, b As String) As String
...
Return CStr(A & B)
End Function
' Use the Functions
VoidFunction()
Dim s1 As String = StringFunction()
Dim s2 As String = ParmFunction("Hello", "World!")

JScript.NET

// Declare a void return function
function voidfunction() : void {
...
}
// Declare a function that returns a value
function stringfunction() : String {
...
return String(val);
}
// Declare a function that takes and returns values
function parmfunction(a:String, b:String) : String {
...
return String(a + b);
}
// Use the Functions
voidfunction();
var s1:String = stringfunction();
var s2:String = parmfunction("Hello", "World!");