Click here to Skip to main content
15,914,111 members
Home / Discussions / C#
   

C#

 
AnswerRe: Setting Debugger Mode Pin
Colin Angus Mackay11-Jan-07 6:12
Colin Angus Mackay11-Jan-07 6:12 
GeneralRe: Setting Debugger Mode Pin
Beringer11-Jan-07 8:30
Beringer11-Jan-07 8:30 
GeneralRe: Setting Debugger Mode Pin
Larantz11-Jan-07 10:31
Larantz11-Jan-07 10:31 
QuestionAbout insert record Pin
mwith11-Jan-07 5:41
mwith11-Jan-07 5:41 
AnswerRe: About insert record Pin
lost in transition 11-Jan-07 6:00
lost in transition 11-Jan-07 6:00 
QuestionHooking Windows Api Calls Pin
joejoeiscool11-Jan-07 5:36
joejoeiscool11-Jan-07 5:36 
AnswerRe: Hooking Windows Api Calls Pin
Dave Kreskowiak11-Jan-07 5:47
mveDave Kreskowiak11-Jan-07 5:47 
QuestionHandling array argument! Pin
C++NewBe11-Jan-07 4:30
C++NewBe11-Jan-07 4:30 
I am converting vb6 code to C# and I have a question regarding array argument. In vb6 the array argument below sometimes take the form of 1Dimension or MultiD where it is Redim depending on how it comes. C# does not allow this.....my question is, how do I handle it?


public double[] ConvertMatrixToBase0(double[] MyMat)
{
long i, j;
double[] ConvMat;

if(MultiDimensional(MyMat) == false) //1-dimensional array
{
ConvMat = new double[MyMat.GetLength(1) - 1]; //ReDim ConvMat(UBound(MyMat, 1) - 1)
for(i=1; i<=MyMat.GetLength(1); i++) //For i = 1 To UBound(MyMat, 1)
ConvMat[i - 1] = MyMat[i];

}
else //multi-dimensional array
{
ConvMat = new double[MyMat.GetLength(1)-1, MyMat.GetLength(2)-1]; //ReDim ConvMat(UBound(MyMat, 1) - 1, UBound(MyMat, 2) - 1)
for(i=1; i<=MyMat.GetLength(1); i++) //For i = 1 To UBound(MyMat, 1)
{
for(j=1; j<=MyMat.GetLength(2); j++) //For j = 1 To UBound(MyMat, 2)
ConvMat[i-1,j-1] = MyMat[i,j];
}
}

return ConvMat;
}
AnswerRe: Handling array argument! Pin
led mike11-Jan-07 6:06
led mike11-Jan-07 6:06 
GeneralRe: Handling array argument! Pin
C++NewBe11-Jan-07 7:23
C++NewBe11-Jan-07 7:23 
GeneralRe: Handling array argument! Pin
Not Active11-Jan-07 8:11
mentorNot Active11-Jan-07 8:11 
GeneralRe: Handling array argument! Pin
C++NewBe11-Jan-07 8:14
C++NewBe11-Jan-07 8:14 
GeneralRe: Handling array argument! Pin
Not Active11-Jan-07 8:33
mentorNot Active11-Jan-07 8:33 
QuestionQuick Question Pin
BlitzPackage11-Jan-07 4:29
BlitzPackage11-Jan-07 4:29 
AnswerRe: Quick Question Pin
Mircea Puiu11-Jan-07 4:32
Mircea Puiu11-Jan-07 4:32 
AnswerRe: Quick Question Pin
Tyler4511-Jan-07 6:58
Tyler4511-Jan-07 6:58 
GeneralRe: Quick Question Pin
Mircea Puiu11-Jan-07 20:36
Mircea Puiu11-Jan-07 20:36 
AnswerRe: Quick Question Pin
Thomas Stockwell13-Jan-07 6:08
professionalThomas Stockwell13-Jan-07 6:08 
QuestionObfuscator : which one is best? Pin
ajisthekingofpop11-Jan-07 4:18
ajisthekingofpop11-Jan-07 4:18 
AnswerA good selection Pin
Mircea Puiu11-Jan-07 4:29
Mircea Puiu11-Jan-07 4:29 
GeneralRe: A good selection Pin
ajisthekingofpop11-Jan-07 4:56
ajisthekingofpop11-Jan-07 4:56 
GeneralRe: A good selection Pin
Mircea Puiu11-Jan-07 20:34
Mircea Puiu11-Jan-07 20:34 
AnswerRe: Obfuscator : which one is best? Pin
roto2311-Jan-07 6:11
roto2311-Jan-07 6:11 
Questionautomatic instansiation Pin
groundzero11111-Jan-07 4:13
groundzero11111-Jan-07 4:13 
AnswerRe: automatic instansiation Pin
Mircea Puiu11-Jan-07 4:23
Mircea Puiu11-Jan-07 4:23 

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.