Here u go...

public void GetSimilarNeighbours(int xpos, int ypos)
        {

                var positions = from x in Enumerable.Range(xpos - 1, 3)
                                 from y in Enumerable.Range(ypos - 1, 3)
                                 where x >= 0 && y >= 0 && x <
_matrix.GetLength(0) && y < _matrix.GetLength(1)
                                 select new { x, y };

        }



On Tue, Jul 24, 2012 at 11:55 AM, Cerebrus <zorg...@sify.com> wrote:

> With a description as scarce as that, the only one who might be able
> to assist you might be Neo, himself.
>
> On Jul 23, 10:34 pm, Anuj Sharma <anuj.sharma250...@gmail.com> wrote:
> > >  Hi All,
> >
> >  Please tell me solution of that problem in c# as soon as possible.
> >
> >
> >
> >
> >
> >
> >
> > > Problem:- Find neighbouring cells having same values in a matrix.
> >
> > > --
> > >> Thanx & Regards,
> > >> Anuj Sharma
> > >> *The future belongs to those who believe in the beauty of their
> dreams.*
> >
> > > --
> >
> > > --Thanks & Regards :
> >
> > >     Anuj Sharma
> >
> > --
> >
> > --Thanks & Regards :
> >
> >     Anuj Sharma- Hide quoted text -
> >
> > - Show quoted text -
>
> --
> You received this message because you are subscribed to the Google
> Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
> Web Services,.NET Remoting" group.
> To post to this group, send email to dotnetdevelopment@googlegroups.com
> To unsubscribe from this group, send email to
> dotnetdevelopment+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
> or visit the group website at http://megasolutions.net
>

-- 
You received this message because you are subscribed to the Google
Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
Web Services,.NET Remoting" group.
To post to this group, send email to dotnetdevelopment@googlegroups.com
To unsubscribe from this group, send email to
dotnetdevelopment+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
or visit the group website at http://megasolutions.net

Reply via email to