0

I have wrote a program to check the N++ that if it works with C# programs to execute directly within it, I set it up using NppExec plugin and set the path for the script is

"C:\Windows\Microsoft.NET\Framework\v3.5\csc.exe" /out:"$(FULL_CURRENT_PATH).exe" "$(FULL_CURRENT_PATH)" "$(FULL_CURRENT_PATH).exe"

my simple written program to check it is,

static void Main(string[] args)
      {
      sayHello();
      Console.Read();
      }

       static void SayHello()
       {
       Console.Write("Hello World!, I'm practicing at the moment.");
       }             

When I compile it hitting F6 it throws the error

Process started >>> Microsoft (R) Visual C# 2008 Compiler version 3.5.30729.4926 for Microsoft (R) .NET Framework version 3.5 Copyright (C) Microsoft Corporation. All rights reserved.

My_practice.cs(12,4): error CS0103: The name 'sayHello' does not exist in the current context
<<< Process finished. (Exit code 1)
"D:\My_practice.cs.exe" CreateProcess() failed with error code 2:
The system cannot find the file specified.

While there is no error in my program checking on VS.

1 Answer 1

1

C# is case sensitive. The sayHello() call should be SayHello().

static void Main(string[] args)
{
   //sayHello();   <-- Invalid due to lowercase "s"
   SayHello();
   Console.Read();
}

static void SayHello()
{
   Console.Write("Hello World!, I'm practicing at the moment.");
}  
Sign up to request clarification or add additional context in comments.

1 Comment

Hahahahahah I'm very stupid and blind enough to not see that minor mistake.

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.