AtomicChip
Programmer
I'm having problems converting the following VB.Net code to C#:
sub Page_Load ()
dim au
dim str
set au = server.createobject("Persits.AspUser"
str = au.getusername
end sub
Using vb.net, the code works great. I tried the following using C#:
public int Page_Load()
{
string userName;
object au = server.createobject("Persits.AspUser"
;
userName = au.GetUserName();
}
When I use the C# version of this, I get the following error:
Compiler Error Message: CS0117: 'object' does not contain a definition for 'GetUserName'
Any suggestions? -----------------------------------------------
"The night sky over the planet Krikkit is the least interesting sight in the entire universe."
-Hitch Hiker's Guide To The Galaxy
sub Page_Load ()
dim au
dim str
set au = server.createobject("Persits.AspUser"
str = au.getusername
end sub
Using vb.net, the code works great. I tried the following using C#:
public int Page_Load()
{
string userName;
object au = server.createobject("Persits.AspUser"
userName = au.GetUserName();
}
When I use the C# version of this, I get the following error:
Compiler Error Message: CS0117: 'object' does not contain a definition for 'GetUserName'
Any suggestions? -----------------------------------------------
"The night sky over the planet Krikkit is the least interesting sight in the entire universe."
-Hitch Hiker's Guide To The Galaxy