Click here to Skip to main content
16,004,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
so im coding and this happens

as you can see below "Main" has 2 regular brackets while "Add" doesnot, for some reason when ever im in Add and press shift + "{" only 1 bracket forms instaed of 2 which is annoying since it prevents me from declaring a body. so how do i fix this

What I have tried:

namespace Aiwi
{
    class Program
    {
        static void Main()
        {

        }

        public int Add(int Fn, int Sn);
        {
        
    }
}
Posted
Updated 13-Jun-18 0:53am

1 solution

The problem is sourced by the trailing semicolon on the line
C#
public int Add(int Fn, int Sn);
Remove that and it will work as expected.
 
Share this answer
 
Comments
Maciej Los 13-Jun-18 8:44am    
Hawk eye!

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