Click here to Skip to main content
15,117,925 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Sir, you said not to return arrays from a I'm thinking this way...because
I need a method in a class that will return a static array which is to be consumed by another class..
class a
    public static string[,,,] row;
    private string[,,,] DoSomething()
         Do some work with row...
         return row;

class B
    public void Consumer()
        a d=new a();
        private string[,,,] col;
        Do some work.....
This will be the program....

What I have tried:

This is the way I am thinking and have Sir you have told property shouldnn't return arrays.....So this way thought....So Sir will there be any performance problem...
Sir for your information.... lot of work had been done using multi--dimensional array, so I don't want to modify those coding.....but newly written code shall be written without any problems.. By Sir I want to mean he is guiding me....
Updated 11-Jul-20 4:48am
Garth J Lancaster 11-Jul-20 9:04am
Sir ? to which 'Sir' do you refer to - this doesnt make sense without the original reference or article - you would have been better off to reply there or to use 'Improve question'
Member 12712527 11-Jul-20 9:43am
I referred to Mr. OriginalGriff....
Richard MacCutchan 11-Jul-20 9:59am
Then reply to the message he posted, rather than opening a new question and hoping that he happens across it. Despite the fact that ...
Richard MacCutchan 11-Jul-20 10:02am
You have declared Dosomething as private so it cannot be called from outside of the class. And using a static property is a bad idea as it means you cannot have more than one instance of the a class in your application. But the real question is what exactly you need a 3D array for in the first palce.
Member 12712527 11-Jul-20 10:18am
4-Dimensional Array....
Member 12712527 11-Jul-20 10:20am
But Sir the question was downvoted. Still shall he come across it....?
CHill60 13-Jul-20 10:47am
If you use the "Reply" link to a post then that member is notified of your reply. Unlike all of your comments here.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900