C# .NET - To change the position of XML every 5 mins

Asked By abinav shankar on 01-Oct-12 04:39 AM

Hi

I have a xml file in which i have 5 blocks totally and i want to change the position simutaneously (i.e) The first element after a period of time should be displayed last and vice versa how to do it

Cos mos replied to abinav shankar on 01-Oct-12 04:54 AM
System.Random RandNum = new System.Random();
int MyRandomNumber = RandNum.Next(1, 5);


switch(MyRandomNumber )
{
case 0:
var q = from c in db.Customers


        select new
        {


            CId = c.CustomerID,


            FName = C.FirstName,


            LName = C.LastName,

   Age = C.Age,


   City = C.City


        };
        break;


case 1:
select new
        {
            FName = C.FirstName,


            LName = C.LastName,

   Age = C.Age,


   City = C.City,


   CId = c.CustomerID,


        };
        break;


case 2:
select new
        {
   City = C.City,


            CId = c.CustomerID,


            FName = C.FirstName,


            LName = C.LastName,

   Age = C.Age
   
        };
        break;

}