|
-
May 23rd, 2003, 07:22 AM
#1
Thread Starter
Hyperactive Member
VB Public Type ... End Type eqv. C# [Resolved]
What is the syntax in C# for VB's Type declaration
VB Code:
public type tMyType
ID as Long
Name as String
end type
public type tSecondType
Emp as tMyType
end type
I have just installed VS.NET 2003 and I dont like the dynamic help and MSDN tha was shipped with it 
Thanks
Last edited by onerrorgoto; Sep 23rd, 2003 at 04:32 AM.
Onerrorgoto
Dont be to optimistic, the light at the end of the tunnel might be a train
-
May 23rd, 2003, 07:40 AM
#2
Hyperactive Member
Just write a class:
Code:
class test{
string name
string bla
public test(string n, string m)
{
name = n
bla = m
}
public String Name
{
get{return name;}
}
public String bla
{
get{return bla;}
}
Just an example,
Hope I could help,
Stephan
Keep Smiling - even if its hard 
Frankie Says Relax, wossname Says Yeah!
wossname:--Currently I'm wearing a gimp suit and a parachute.
C# - Base64 Blog
-
May 23rd, 2003, 08:00 AM
#3
Thread Starter
Hyperactive Member
Thanks
Im in the process of porting a vb6 project to C# and Webforms.
The types is Private and therefore I dont want to make properties of them.
I got the advise from another forum that I should use:
private struct MyType
{
}
But thanks for your reply.
Onerrorgoto
Dont be to optimistic, the light at the end of the tunnel might be a train
-
May 23rd, 2003, 08:08 AM
#4
as a note vb.net uses Struct now also. Type is gone for that.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|