Shiny
Shiny

Reputation: 1083

How to call static function from another static function

public static void func1(string a,string c)

{

func2(a,c)--- error

}

public static void func2(string a,string c)

{


}

if im wrong please correct it. I need function to be called this way... function to be static.please help

Upvotes: 3

Views: 170

Answers (3)

Grozz
Grozz

Reputation: 8425

Nothing wrong with that. Forgot ";"?

Or your names are in conflict with already used ones. Try changing them and see what happens.

Upvotes: 2

Sachin Shanbhag
Sachin Shanbhag

Reputation: 55479

I dont see anything wrong with the code snippet you have added, Can you give some more details on namespace for these functions

Upvotes: 0

spender
spender

Reputation: 120380

Is the error a missing semicolon? The lack of error message makes this a guessing game.

Upvotes: 3

Related Questions