3
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

8
  • 5
    Looks fine, are they in the same type? And you are missing the semi-colon. If the static method is in another type, you prefix the type name: MyType.Func2(a, b); Commented Jul 29, 2010 at 12:19
  • 3
    Whats the error message? Commented Jul 29, 2010 at 12:22
  • I would bet money that the error or exception will explicitly and clearly explain what the problem is.. Commented Jul 29, 2010 at 12:25
  • Two functions are related with directory func(directoryInfo source,directoryInfo dest) still error. Commented Jul 29, 2010 at 12:26
  • 1
    Hints for getting useful answers quickly: 1) Post complete code. 2) If there's an error, post the error message. Commented Jul 29, 2010 at 12:44

3 Answers 3

3

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

Sign up to request clarification or add additional context in comments.

Comments

2

Nothing wrong with that. Forgot ";"?

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

Comments

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.