Convert one list to the other list type

I am doing this below - any better way to do this? converting one list to the other without creating new object?

DataContext c = new DataContext();
List<X> x=
context.X.Where(a =>>Datetime.Now>).ToList();            
        foreach(var a in x)
            Y y= new Y();
            y.Name= a.Name;                



You might try:

var ys = context.X
                .Where(x => > DateTime.Now)
                .Select(x => new Y { Name = x.Name });


Need Your Help

Maven Release-plugin "tag already exists" for nonexistant tag

git maven bamboo bitbucket-server svn2git

My setup: git-repository on an Atlassian Stash-server and Atlassian Bamboo.

Simple collsion not working to the left or top


This should be a very easy question, basically I have two squares, and I'm trying to see if they overlap. So far I've figured out the right and bottom collisions, but I can't figure out collisions ...