0

How do you create static methods using C#? How do you specify each items in the static methods? thanx.. I'm a C# newbie >.<

3
Contributors
3
Replies
4
Views
10 Years
Discussion Span
Last Post by Monyet
0

How do you create static methods using C#?

class staticClass {
  public static void staticMethod() {
    //do something
  }
}

How do you specify each items in the static methods? thanx.. I'm a C# newbie >.<

I don't understand this question? what is an item?

search for a tutorial about c#, which gives more details about static stuff and more...

0

I think he means parameter not items. Parameters are pased to static methds in the same way that parametes are passed to private , public, etc methods. No special parameter syntax required.

0

I think he means parameter not items. Parameters are pased to static methds in the same way that parametes are passed to private , public, etc methods. No special parameter syntax required.

yeah, actually I found the way to do it.. haha that's cuz I'm new with C# right, that's why I kind of confused with the namespace :eek:

  1. <LI class=li1>

class staticClass {
<LI class=li1> public static void staticMethod() {
<LI class=li1> //do something
<LI class=li1> }
[*]}
instead of that, i put public class static void ... bla bla, didn't realize that it's inside a class already >.< thanx guys! :twisted:

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.