T
T
Timofey2020-03-04 02:25:00
C++ / C#
Timofey, 2020-03-04 02:25:00

How to pass array by argument outside via Console.ReadLine?

I tried to write a function for sorting an array, but I need an array that passes data by argument and takes this data from somewhere outside, I tried it through Сonsole.ReadLine I can’t take and pass this data, don’t judge strictly, I just started practicing in c#
https:// ideone.com/rFghQI

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DanielMcRon, 2020-03-04
@timofeygusevopal

Well, it's an easy task, learn C# better.
1 An array is created
2. This is passed to the method
3. Using the construction

var orderMassive = massiveOfInts.OrderBy().ToArray;
return orderMassive;

You make a method, in general, this is what it is.
Learn Linq, or at least how to work with arrays

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question