Click here to Skip to main content
15,507,147 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can I resolve next error in below code:
No overload for method 'JokleBokle' takes '0' arguments

C#
namespace Jokle.csproj
{
    public partial class JokleBokle
    {       
        public Form1 RWindow = new Form1();
        public Form2 BWindow = new Form2();

        public void Main()
        {
            BWindow.ShowDialog();
        }

        static public void FOVR()
        {
            MessageBox.Show("This is FOVR");
            JokleBokle ssee = new JokleBokle();
            ssee.PPO();
        }

        public void PPO()
        {
            MessageBox.Show("Working - This is PPO");
        }
    }
}
Posted
Comments
Frans Jan 30-Nov-12 6:03am    
I think you're missing the constructor?
Member 9598596 30-Nov-12 6:18am    
Plese can you write the code for adding constructor.
Richard MacCutchan 30-Nov-12 6:21am    

1 solution

Hi,
it should work fine. No issue.

if you want to add constructor update your code as below.

C#
namespace Jokle.csproj
{
    public partial class JokleBokle
    {       
        public Form1 RWindow = new Form1();
        public Form2 BWindow = new Form2();
        public JokleBokle()
          {
           }
        public void Main()
        {
            BWindow.ShowDialog();
        }
 
        static public void FOVR()
        {
            MessageBox.Show("This is FOVR");
            JokleBokle ssee = new JokleBokle();
            ssee.PPO();
        }
 
        public void PPO()
        {
            MessageBox.Show("Working - This is PPO");
        }
    }
}


refer below link for more about constructor.

An Intro to Constructors in C#[^]

http://msdn.microsoft.com/en-us/library/vstudio/ace5hbzh.aspx[^]
 
Share this answer
 
v3
Comments
Member 9598596 30-Nov-12 6:14am    
Plese can you write the code for adding constructor.
Member 9598596 30-Nov-12 6:27am    
Thanks
But now I get this error:
Error No overload for method 'OuterDispProxy' takes '0' arguments
Mohd. Mukhtar 30-Nov-12 6:40am    
This error is coming from some other file.

Place a debug point and debug the code line by line.
Member 9598596 30-Nov-12 6:47am    
This error is comming from here:
public JokleBokle()
{
}

But this is very strange, here is not "OuterDispProxy". And also elsewhere is not this "OuterDispProxy".

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