Click here to Skip to main content
15,887,328 members
Home / Discussions / C#
   

C#

 
Questionmean Pin
v_neil8719-Mar-10 18:52
v_neil8719-Mar-10 18:52 
AnswerRe: mean Pin
Rod Kemp19-Mar-10 19:35
Rod Kemp19-Mar-10 19:35 
AnswerRe: mean Pin
v_neil8719-Mar-10 19:43
v_neil8719-Mar-10 19:43 
AnswerRe: mean Pin
Not Active19-Mar-10 19:53
mentorNot Active19-Mar-10 19:53 
QuestionGetting a value from a constructor Pin
av725419-Mar-10 7:22
av725419-Mar-10 7:22 
AnswerRe: Getting a value from a constructor Pin
PIEBALDconsult19-Mar-10 7:27
mvePIEBALDconsult19-Mar-10 7:27 
GeneralRe: Getting a value from a constructor Pin
av725420-Mar-10 2:08
av725420-Mar-10 2:08 
GeneralRe: Getting a value from a constructor Pin
OriginalGriff20-Mar-10 2:55
mveOriginalGriff20-Mar-10 2:55 
Not exactly a difficult thing to do: it is pretty common:
Using your original code:
public class Matrika
    { 
    public int[,] arrayOfInts;
    public Matrika(int x, int y)
        {
        arrayOfInts = new int[x, y];
        }
    }

static void Main(string[] args)
    {
    Matrika polzisce = new Matrika(5, 5);
    for (int x = 0; x < 5; x++)
        {
        for (int y = 0; y < 5; y++)
            {
            Console.WriteLine(polzisce.arrayOfInts[x, y]);
            }
        }
    }
Note that it is not considered good practice to declare the array as public: I did this only to simplify this example.
Note also that the ints are not initialised, so they will all be zero.
You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace

C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy

GeneralRe: Getting a value from a constructor Pin
av725420-Mar-10 5:32
av725420-Mar-10 5:32 
GeneralRe: Getting a value from a constructor Pin
OriginalGriff20-Mar-10 6:53
mveOriginalGriff20-Mar-10 6:53 
GeneralRe: Getting a value from a constructor Pin
Phillip Donegan23-Mar-10 6:46
Phillip Donegan23-Mar-10 6:46 
AnswerRe: Getting a value from a constructor Pin
jayantbramhankar19-Mar-10 8:30
jayantbramhankar19-Mar-10 8:30 
GeneralRe: Getting a value from a constructor [modified] Pin
PIEBALDconsult19-Mar-10 8:58
mvePIEBALDconsult19-Mar-10 8:58 
GeneralRe: Getting a value from a constructor Pin
AspDotNetDev19-Mar-10 9:12
protectorAspDotNetDev19-Mar-10 9:12 
GeneralRe: Getting a value from a constructor Pin
PIEBALDconsult19-Mar-10 9:40
mvePIEBALDconsult19-Mar-10 9:40 
GeneralRe: Getting a value from a constructor Pin
av725420-Mar-10 2:12
av725420-Mar-10 2:12 
AnswerRe: Getting a value from a constructor Pin
PIEBALDconsult20-Mar-10 3:29
mvePIEBALDconsult20-Mar-10 3:29 
Questionfrom C++ dll to microsoft C# in .NET Pin
pedefetoll19-Mar-10 4:40
pedefetoll19-Mar-10 4:40 
AnswerRe: from C++ dll to microsoft C# in .NET Pin
Wes Aday19-Mar-10 4:45
professionalWes Aday19-Mar-10 4:45 
GeneralRe: from C++ dll to microsoft C# in .NET Pin
pedefetoll19-Mar-10 4:50
pedefetoll19-Mar-10 4:50 
GeneralRe: from C++ dll to microsoft C# in .NET Pin
Wes Aday19-Mar-10 4:55
professionalWes Aday19-Mar-10 4:55 
Questionproblem in reading .csv files Pin
montu337719-Mar-10 4:19
montu337719-Mar-10 4:19 
AnswerRe: problem in reading .csv files Pin
Wes Aday19-Mar-10 4:41
professionalWes Aday19-Mar-10 4:41 
GeneralRe: problem in reading .csv files Pin
montu337719-Mar-10 4:59
montu337719-Mar-10 4:59 
GeneralRe: problem in reading .csv files Pin
Wes Aday19-Mar-10 5:13
professionalWes Aday19-Mar-10 5:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.