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
yamid
NA
98
0
Passing MultiDimensional Arrays to a method in C#
Nov 11 2009 10:55 AM
I have several arrays in my Program with diffrent diemensions. for example A, B,C,D,E,...( 5-Dim,4-Dim, ...).
I want to write ONE general method that is able to accept all of those arrays with different Ranks inwhich the USER just specifies the rank and program should read this rank and accept it as an argument.
Here I *donot* want to write several methods of the same structure inwhich just the dimensions of input array is changing. instead I will tell the method the dimension of the input array.
for example;
// definition of Array "A","B",..."N" as multi-D arrays of diffrent ranks
....
// Method Victory that Accept an Array of any type but the user should define what is the Rank of the array to be passed
// User Defines this ValueOfRank
int ValueOfRankA =3
....= Victory(A);
int ValueOfRankB =6
....=Victory(B);
...
int ValueOfRankN =3
...=Victory(N)
Reply
Answers (
2
)
c# countdown using a timer
Problem in DataGridView using c#