[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

can i see an example of double-array returning function?

Posted on 2005-04-24
8
Medium Priority
?
272 Views
Last Modified: 2010-04-16
can i see an example of double-array returning function?
thanks
0
Comment
Question by:Carl3003
  • 5
  • 3
8 Comments
 
LVL 8

Expert Comment

by:vinhnl
ID: 13856191
What you mean?
0
 

Author Comment

by:Carl3003
ID: 13856265
something like this is in C++,

public array MyArray( .. , ...)
{
    array newArray;
    return newArray;
}
0
 
LVL 8

Expert Comment

by:vinhnl
ID: 13856284
public int[] MyArray(int[] array1, int[] array2)
{
     int[] newarray = new int[array1.Length+array2.Length];
     for(int i=0;i<array1.Length;i++)
         newarray[i] = array1[i];
     for(int i=0;i<array2.Length;i++)
         newarray[array2.Length+i] = array1[i];
     return newarray;
}

???
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 8

Accepted Solution

by:
vinhnl earned 200 total points
ID: 13856286
public int[] MyArray(int[] array1, int[] array2)
{
     int[] newarray = new int[array1.Length+array2.Length];
     for(int i=0;i<array1.Length;i++)
         newarray[i] = array1[i];
     for(int i=0;i<array2.Length;i++)
         newarray[array1.Length+i] = array2[i];//<--
     return newarray;
}

???
0
 

Author Comment

by:Carl3003
ID: 13856301
this is in C++?
Is it the same in C#?
0
 
LVL 8

Expert Comment

by:vinhnl
ID: 13856310
oui
0
 
LVL 8

Expert Comment

by:vinhnl
ID: 13856312
yes
0
 

Author Comment

by:Carl3003
ID: 13856379
ok thanks..
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month19 days, left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question