Answer the question
In order to leave comments, you need to log in
Create an intermediate variable or pass an argument from function to function?
I am writing an application for quantizing images while learning C#.
Now I have a static controller class that has a public method that takes an array (representing an image) and passes it to a private method, which in turn does something with that array and passes it to the next private method , and so on (in total, such a transfer occurs 5 times).
So, the question arose, how best to do it: leave everything as it is (pass an array from method to method) or is it worth creating an intermediate list (List) in a static class, and manipulating data already in it? What does OOP say about this and how will it affect performance? And if the array is passed strictly by reference through ref?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question