TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
anndy smaals
NA
24
4.4k
passing parameters with out
Dec 15 2018 7:29 PM
write the method GetTopThree, which takes an array of integers and three integers as out int parameters. Assign the highest value in the array to the last out int parameter, the second highest to the second and the third highest to the first parameter.
using System;
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
int bronze, silver, gold;
int[] numbers = { 100, 23, 3, 45, 6, 78 };
GetTopThree(numbers, out bronze, out silver, out gold);
Console.WriteLine(bronze + ", " + silver + ", " + gold);
}
}
}
Reply
Answers (
1
)
how to declare a method
Convert Row data into column against one id