Question: The code below is in C# and I'm using Visual Studio 2010. 

```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace FrontEnd
{
    class Flow
    {
        long i;
        private int x,y;
        public int X
        {
            get;set;
        }
        public int Y
        {
            get;set;
        }

        private void Flow()
        {
            X = x;
            Y = y;
        }

        public void NaturalNumbers(int x, int y)
        {
            for (i = 0; i < 9999; i++)
            {
                Console.WriteLine(i);
            }
            MessageBox.Show("done");
        }
    }
}

```

When I compile the above code I get this error:

> 
> Error: 'Flow': member names cannot be the same as their enclosing type
> 
> 
> 

Why? How can I resolve this?

Answer: 
The problem is with the method:

```
private void Flow()
{
    X = x;
    Y = y;
}

```

Your class is named `Flow` so this method can't also be named `Flow`. You will have to change the name of the `Flow` method to something else to make this code compile.

Or did you mean to create a private constructor to initialize your class? If that's the case, you will have to remove the `void` keyword to let the compiler know that your declaring a constructor.
just remove this because constructor don't have a return type like void
it will be like this :

```
private Flow()
    {
        X = x;
        Y = y;
    }  

```