Hi,
I have several arrays that look like this:
string[] productsString0 = new string[1000];
After they are no longer needed, How can I reset them as though the
program were just started?
Thanks,
Trint 5 16670
Array.Clear(...)
public static void Clear (
Array array,
int index,
int length
)
trint wrote:
Hi,
I have several arrays that look like this:
string[] productsString0 = new string[1000];
After they are no longer needed, How can I reset them as though the
program were just started?
Thanks,
Trint
On Jun 4, 11:02 am, Daniel Cigic <daniel.ci...@googlemail.comwrote:
Array.Clear(...)
public static void Clear (
Array array,
int index,
int length
)
trint wrote:
Hi,
I have several arrays that look like this:
string[] productsString0 = new string[1000];
After they are no longer needed, How can I reset them as though the
program were just started?
Thanks,
Trint- Hide quoted text -
- Show quoted text -
Thanks!
On Jun 4, 8:27 pm, trint <trinity.sm...@gmail.comwrote:
On Jun 4, 11:02 am, Daniel Cigic <daniel.ci...@googlemail.comwrote:
Array.Clear(...)
public static void Clear (
Array array,
int index,
int length
)
trint wrote:
Hi,
I have several arrays that look like this:
string[] productsString0 = new string[1000];
After they are no longer needed, How can I reset them as though the
program were just started?
Thanks,
Trint- Hide quoted text -
- Show quoted text -
Thanks!- Hide quoted text -
- Show quoted text -
Use clear method from Array class -
Array.Clear(productsString0,0,productsString0.Leng th);
Aneesh P wrote:
On Jun 4, 8:27 pm, trint <trinity.sm...@gmail.comwrote:
>On Jun 4, 11:02 am, Daniel Cigic <daniel.ci...@googlemail.comwrote:
>>Array.Clear(...) public static void Clear ( Array array, int index, int length ) trint wrote: I have several arrays that look like this: string[] productsString0 = new string[1000]; After they are no longer needed, How can I reset them as though the program were just started? Trint- Hide quoted text - - Show quoted text -
Thanks!- Hide quoted text -
- Show quoted text -
Use clear method from Array class -
Array.Clear(productsString0,0,productsString0.Leng th);
That was what was also in the top post ...
Arne
trint wrote:
I have several arrays that look like this:
string[] productsString0 = new string[1000];
After they are no longer needed, How can I reset them as though the
program were just started?
Other has suggested Array.Clear, but in many circumstance you
would just let it go out of scope and have the garbage collector
take care of everything.
Arne This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: pauld |
last post by:
Ive tried almost every combination of while,foreach, key, value ,
array,0 I can some up with
Ive got an associative array that Ive been using as a counter
eg if (blah blah blah )
{$array++}...
|
by: Terry Andersen |
last post by:
I have an array that I initialize to zero, like:
Buffer = {0x00};
How do I in my code reset this array to all zeros ones more? Without running
a whole for loop?
Best Regards
Terry
|
by: Rick |
last post by:
Hi,
This is probably piece of cake for you C gurus but it is giving me a
headache. I'm still not really used with pointers and chars so many things
are going wrong. Practicing makes wonders but...
|
by: ritchie |
last post by:
Hi,
I am writing to ask if anyone can see why my array is not being sorted
correctly?
It's an array of 4 elements(ints 1,2,3,4) but after calling the
selection sort
it comes back sorted as...
|
by: 0to60 |
last post by:
I can declare and initialize a managed array of managed types like this:
System::Object* array __gc = {...}
Now, what do I do if I wanna reset that array to something else without...
|
by: Crirus |
last post by:
I have a big array 512*512 elements
Wich is the best way to reset the array to 0 on each element?
Redim without preserve, I have for loop and clear shared function
Wich one is best optimised for...
|
by: Skeleton Man |
last post by:
Hi all,
I'm after the PHP equivlent to this Perl construct:
print @{};
In the above example someFunctionCall() would return an array, and we're
printing the first item from the returned...
|
by: bdbeames |
last post by:
I have and array that I fill with elements in a function.
I call it later and want to reset it so that it is empty so I can fill it with different elements and a different number of elements. How...
|
by: BiraRai |
last post by:
is it possible to add new variable to a array object at run time?
the following code does not work.
$iterator->current()-> = 1234;
how can this be done?
function...
|
by: SM |
last post by:
Hello,
I've done some research on how to grab the first key of a
multidimensional array. I've came up with a couple of solutions. Wich
is the best?. If possible, can it be done in just one line of...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |