|
-
Nov 4th, 2002, 09:19 PM
#1
Thread Starter
Addicted Member
optional and arrays
Hi,
I have two questions maybee someone can help me with.
1) How can i make a parameter optional, example in vb I would do myFunc(a as string, optional b as string).
2) How can i redelcar an array example in vb I would do this Dim myarray(4) as string then I could do redim myarray(6).
Any help would be appreciated.
Jeremy
-
Nov 4th, 2002, 09:41 PM
#2
PowerPoster
1.) The C# Language does not support optional paramaters. You need to overload your methods in order to provide this functionality.
2.) Check out the ArrayList() class. You do not have to explicity re-dimiension your array, the arraylist() will automatically adjust to your adding/removing of objects.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|