Click here to Skip to main content
15,881,938 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
if (flatTextBox1.Text == "3581")
            {

                Azoth.Menu sForm1 = Azoth.Menu();
                sForm1.Show();

            }
            else
            {
                MessageBox.Show("Invalid");
            }
        }


What I have tried:

I keep getting that Menu is
Error CS1955 Non-invocable member 'Menu' cannot be used like a method
Posted
Updated 26-Feb-23 12:13pm

1 solution

Well without seeing the code for the Azoth class , the best guess is that Menu is a property and not a method.

Have you tried this?
Azoth.Menu sForm1 = Azoth.Menu;
 
Share this answer
 
Comments
Daniel Sivochek 27-Apr-20 19:15pm    
Error CS0119 'Menu' is a type, which is not valid in the given context
Just tried it still no work :/ What I am trying to do is open another project this is what i have been given but it has not worked

yourSecondProjectName.Form1 sForm1 = New yourSeondProjectName.form1();
sForm1.Show();

or for me, it will be

Azoth.Menu sForm1 = Azoth.Menu();
sForm1.Show();
MadMyche 27-Apr-20 19:17pm    
Then try this out
Azoth.Menu sForm1 = new Azoth.Menu();
Daniel Sivochek 27-Apr-20 19:20pm    
Thanks that worked, I just need a lower Framework :)
phil.o 28-Apr-20 3:30am    
You mainly need to study the basics of OOP and C# syntax.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900