You need to delete the same object, not a copy.
Users us_end;
foreach (var VARIABLE in ((List<Users>)Application["Users_On"]))
{
if(VARIABLE.Id == (int)Session["Current_Id"])
{
us_end = (Users)VARIABLE;
break;
}
}
if (us_end != null)
{
List<Users> us = ((List<Users>)Application["Users_On"]);
us.Remove(us_end);
Application["Users_On"] = us;
}
Edit:
To clarify the address here as pst pointed out, you can also implement the interface IEquatableand some overheads as in Groo's answer to make it work, but I think it overflows with this topic. Giving this as the most common practice, but it is clear that it also allows you to remove items from the list, even if they are different instances or even different objects with a similar technique.
Ref.: http://msdn.microsoft.com/en-us/library/ms131187.aspx