Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to transpose rows into columns and columns into rows in
a multi-dimensional array?

Answer Posted / raji

int [,]array=new int[2,2] {{1,2},{3,4}};

transpose of the array is

for(int i=0;i<2;i++)
{
for(int j=0;j<2;j++)
{
Console.Write("{0} ",a[j,i]);
}
}

o/p : 1 3
2 4

Is This Answer Correct ?    20 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by stack and heap in c#?

861


What is activator c#?

854


What is addressof operator?

912


Why do we need ienumerable in c#?

856


What does firstordefault mean in c#?

899


What is difference between field and property in c#?

788


What are the different types of comments in c#?

825


What do you know about WM_CHAR message?

922


What is the difference between iqueryable and ienumerable?

892


What is file extension of webservices?

988


What is dependency injection?

899


Explain the security with aop?

1006


Why dictionary is used in c#?

902


Explain the ways to deploy an assembly?

911


Why do we use dictionary in c#?

923