|
-
March 28th, 2003, 03:01 PM
#1
What syntactically is going on with [STAThread]?
I know that we are selecting a threading model, but what C# syntax feature is
[object] rettype funcname (args)?
Im learning C# and it bugs me to not know why the compiler likes this.
-
March 28th, 2003, 03:16 PM
#2
MTA/STA models are the threading models supported by C#. the main is the entry point of the C#.NET exe so it starts in STA mode for instance
you could check
VS.NET help
-Paresh
- Software Architect
-
March 28th, 2003, 03:29 PM
#3
Im not interested in what the STAThread means, but what is going on syntactically.
It looks like an array access prior to a function declaration. Im wondering if a C# person can explain it further.
ie:
[somethinghere] int main(void);
-
March 28th, 2003, 03:34 PM
#4
its known as attribute which defines the behaviour of that method for example if you make the usercontrol,
and add a property,
private static readonly short nT;
[Category("Static"),Description("Set/Get Total"),Browsable(true)]
public static short TC
{
get { return nT; }
}
[cate...]
are the attributes for the property TC
which will show up in the designer view of the usercontrol property when u drag and drop it.
Paresh
- Software Architect
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
|