Hello Friends, In this post, i am going to write a C# Program to find Largest element in a Matrix.

C# Program to find Largest Element in a Matrix:

Open Visual Studio and create a Console Application Project. Write the following code in Program.cs file.

```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FindLargestElementDemo
{
class Program
{
int[,] _iMatrix;
public Program()
{
_iMatrix = new int[,] { { 12, 21, 63 }, { 40, 15, 6 } };
}
void PrintMatrix()
{
Console.WriteLine("Elements in the Given Matrix : ");
for (int iCount = 0; iCount < 2; iCount++)
{
for (int jCount = 0; jCount < 3; jCount++)
{
Console.Write(_iMatrix[iCount, jCount] + "\t");
}
Console.WriteLine("\n");
}
}
int FindMax()
{
int iLargest = _iMatrix[0, 0];
for (int iCount = 0; iCount < 2; iCount++)
{
for (int jCount = 0; jCount < 3; jCount++)
{
if (iLargest < _iMatrix[iCount, jCount])
{
iLargest = _iMatrix[iCount, jCount];
}
}
}
return iLargest;
}
static void Main(string[] args)
{
Console.WriteLine("C# Program to find Largest Element in a Matrix");
Program objProgram = new Program();
objProgram.PrintMatrix();
Console.WriteLine("Largest Element : {0}", objProgram.FindMax());
}
}
}```

Conclusion:

Hope you understand how to find Largest Element in a Matrix using C#. Your Feedback, Comments and suggests are always welcome.

Thank You.

Explore post tags

• Its like you read my mind! You seem to know so much about this, like you wrote the book in it or something. I think that you can do with some pics to drive the message home a bit, but other than that, this is fantastic blog. A great read. I’ll definitely be back.

• I cling on to listening to the reports speak about receiving free online grant applications so I have been looking around for the best site to get one. Could you tell me please, where could i acquire some?

• Hi! I could have sworn I’ve visited this website before but after browsing through a few of the articles I realized it’s new to me. Nonetheless, I’m certainly happy I came across it and I’ll be bookmarking it and checking back regularly!|

• Thanks for sharing your thoughts on meta_keyword. Regards|

• I’m not sure exactly why but this weblog is loading extremely slow for me. Is anyone else having this problem or is it a problem on my end? I’ll check back later and see if the problem still exists.

• Thanks for your own labor on this web page. My niece delights in going through investigations and it’s really simple to grasp why. A number of us learn all about the lively way you convey effective guides via this blog and therefore invigorate response from website visitors on the subject matter while our own girl is truly becoming educated a lot. Take advantage of the remaining portion of the year. You are doing a brilliant job.

• Hi, i think that i saw you visited my blog thus i came to Ã¬return the favorÃ®.I am attempting to to find issues to improve my site!I guess its good enough to make use of a few of your ideas!!

• I’m no longer positive where you are getting your info, however great topic. I needs to spend a while finding out more or figuring out more. Thanks for wonderful information I was looking for this info for my mission.

• Wow! This can be one particular of the most useful blogs We’ve ever arrive across on this subject. Basically Great. I’m also an expert in this topic so I can understand your hard work.

• Hello there, You have done an incredible job. I’ll definitely digg it and personally suggest to my friends. I am confident they’ll be benefited from this web site.

• I have been browsing online more than three hours today, yet I never found any interesting article like yours. It is pretty worth enough for me. In my opinion, if all webmasters and bloggers made good content as you did, the net will be a lot more useful than ever before.|

• At this time it looks like BlogEngine is the best blogging platform out there right now. (from what I’ve read) Is that what you are using on your blog?

• Heya i am for the primary time here. I came across this board and I to find It really useful & it helped me out a lot. I’m hoping to provide one thing back and help others such as you helped me.

• Good post and right to the point. I am not sure if this is really the best place to ask but do you folks have any thoughts on where to employ some professional writers? Thanks 🙂

• I just could not leave your web site before suggesting that I actually loved the standard info an individual supply to your visitors? Is going to be again often to check out new posts|

• Great post. I was checking continuously this blog and I am impressed! Extremely helpful info particularly the last part 🙂 I care for such info much. I was seeking this particular information for a very long time. Thank you and best of luck.|

• Unquestionably consider that that you said. Your favourite reason appeared to be at the internet the simplest thing to take into account of. I say to you, I definitely get annoyed while other folks think about worries that they plainly do not know about. You managed to hit the nail upon the highest and outlined out the whole thing with no need side effect , people can take a signal. Will probably be again to get more. Thank you

• Hey! I just wanted to ask if you ever have any trouble with hackers? My last blog (wordpress) was hacked and I ended up losing several weeks of hard work due to no data backup. Do you have any solutions to prevent hackers?|

• I blog quite often and I really appreciate your information. The article has truly peaked my interest. I will bookmark your site and keep checking for new details about once per week. I subscribed to your RSS feed as well.|

• You made some decent points there. I looked on the internet for the issue and found most persons will agree with your site.

• Hi there very cool site!! Guy .. Excellent .. Wonderful .. I’ll bookmark your website and take the feeds also? I am happy to search out a lot of helpful information right here in the post, we need work out extra techniques on this regard, thank you for sharing. . . . . .|

• I like the valuable info you provide in your articles. I will bookmark your weblog and check again here frequently. I’m quite sure I will learn lots of new stuff right here! Good luck for the next!

• This really answered my problem, thanks!

• Fantastic site. Lots of useful information here. I’m sending it to some friends ans also sharing in delicious. And obviously, thanks for your sweat!

• Somebody essentially help to make seriously posts I would state. This is the first time I frequented your web page and thus far? I surprised with the research you made to create this particular publish amazing. Magnificent job!

• Hello! I know this is kinda off topic but I’d figured I’d ask. Would you be interested in trading links or maybe guest writing a blog post or vice-versa? My site goes over a lot of the same topics as yours and I believe we could greatly benefit from each other. If you’re interested feel free to shoot me an e-mail. I look forward to hearing from you! Excellent blog by the way!|