Do something like this:
namespace YourOrg {
public class Utils {
public static bool IsNullOrEmpty(object val) {
return (val==null || val=="");
}
}
}
Notice the keyword static
-----Original Message-----
From: Gerald de Bueger [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 03, 2002 10:27 AM
To: dotnet
Subject: Create my own library of functions
Hi all,
I'm new to .net and want to learn how to do stuff I did in asp in
ASP.Net
In classic asp, I include huge file at the top of each page. Those files
contain usefull functions. For instance, I've got a function called
isNullOrEmpty. So in the page I can just say: if isNullOrEmpty(sValue)
then ....
What would be the best way to do that in .net. I'd like to access the
function directly without having to declare it first. Like if it was a
c# intinsec function as toString() for instance. In other words, is
there a way to get the same functionnality as an include but in a more
powerfull maner?
Thanks for your help. I hope I was clear enough.
Gerald
---
You are currently subscribed to dotnet as: [EMAIL PROTECTED] To
unsubscribe send a blank email to %%email.unsub%%
---------
Administrated by 15 Seconds : http://www.15Seconds.com
List Archives/Search : http://local.15Seconds.com/search Subscription
Information : http://www.15seconds.com/listserv.htm
Advertising Information: http://www.internet.com/mediakit/
---
You are currently subscribed to dotnet as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
---------
Administrated by 15 Seconds : http://www.15Seconds.com
List Archives/Search : http://local.15Seconds.com/search
Subscription Information : http://www.15seconds.com/listserv.htm
Advertising Information: http://www.internet.com/mediakit/