|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
array - how do you get the number of dimensions?I want to check that an array passed in has a certain number of
dimensions - is there a way to check for this in framework 1.1 ? Hi,
Array.Rank property will give you the no. of dimensions. BTW, I think he did post to the dotnet Newsgroup too. Regards, Cerebrus. Show quoteHide quote "Mad Scientist Jr" <usenet_daugh***@yahoo.com> wrote in message news:1140030496.370228.298050@o13g2000cwo.googlegroups.com... > I want to check that an array passed in has a certain number of > dimensions - is there a way to check for this in framework 1.1 ? > Almost everybody in this newsgroup is using VB6 or lower. While you may get
a stray answer to VB.NET / VB2003 / VB2005 questions here, you should ask them in newsgroups devoted exclusively to .NET programming. Look for newsgroups with either the word "dotnet" or "vsnet" in their name. For the microsoft news server, try these newsgroups... microsoft.public.dotnet.general microsoft.public.dotnet.languages.vb microsoft.public.vsnet.general -- Show quoteHide quoteChris Hanscom - Microsoft MVP (VB) Veign's Resource Center http://www.veign.com/vrc_main.asp Veign's Blog http://www.veign.com/blog -- "Mad Scientist Jr" <usenet_daugh***@yahoo.com> wrote in message news:1140030496.370228.298050@o13g2000cwo.googlegroups.com... >I want to check that an array passed in has a certain number of > dimensions - is there a way to check for this in framework 1.1 ? > That's strange, this posting *IS* to
microsoft.public.dotnet.languages.vb I am using Google newsgroups http://groups.google.com maybe it is mistakenly posting and displaying one group as another? >Almost everybody in this newsgroup is using VB6 or lower. microsoft.public.dotnet.general>For the microsoft news server, try these newsgroups... microsoft.public.dotnet.languages.vb microsoft.public.vsnet.general Mea culpa.
I just noticed it was crossposted -- Show quoteHide quoteChris Hanscom - Microsoft MVP (VB) Veign's Resource Center http://www.veign.com/vrc_main.asp Veign's Blog http://www.veign.com/blog -- "Mad Scientist Jr" <usenet_daugh***@yahoo.com> wrote in message news:1140031114.542798.54560@g43g2000cwa.googlegroups.com... > That's strange, this posting *IS* to > microsoft.public.dotnet.languages.vb > > I am using Google newsgroups > http://groups.google.com > > maybe it is mistakenly posting and displaying one group as another? > >>Almost everybody in this newsgroup is using VB6 or lower. >>For the microsoft news server, try these newsgroups... > microsoft.public.dotnet.general > microsoft.public.dotnet.languages.vb > microsoft.public.vsnet.general > > That's strange, this posting *IS* to I didn't notice the cross-post when I replied (as did others) to your> microsoft.public.dotnet.languages.vb > > I am using Google newsgroups > http://groups.google.com > > maybe it is mistakenly posting and displaying one group as another? message. For future reference, the flurry of "wrong group" messages you got is because you included microsoft.public.vb.general.discussion as one of your groups. That group IS only meant to be only for the classic versions of VB. Rick Almost everybody in this newsgroup is using VB6 or lower. While you may get
a stray answer to VB.NET (including VB2003 and VB2005 which has dropped .NET from its name) questions here, you should ask them in newsgroups devoted exclusively to .NET programming (the languages are different enough to warrant separate newsgroup support). Look for newsgroups with either the word "dotnet" or "vsnet" in their name. For the microsoft news server, try these newsgroups for Visual Basic .NET related questions... microsoft.public.dotnet.languages.vb microsoft.public.dotnet.languages.vb.upgrade microsoft.public.dotnet.languages.vb.controls microsoft.public.dotnet.languages.vb.data And these for more general .NET questions microsoft.public.dotnet.general microsoft.public.vsnet.general Note: There are many other .NET newgroups (use the first three "fields" from the last two as templates when searching for them), but the above ones should get you started. Rick Show quoteHide quote "Mad Scientist Jr" <usenet_daugh***@yahoo.com> wrote in message news:1140030496.370228.298050@o13g2000cwo.googlegroups.com... > I want to check that an array passed in has a certain number of > dimensions - is there a way to check for this in framework 1.1 ? > > I want to check that an array passed in has a certain number of
Http://EDais.mvps.org/DotNet/
> dimensions - is there a way to check for this in framework 1.1 ? Hope this helps, Mike - Microsoft Visual Basic MVP - E-Mail: ED***@mvps.org WWW: Http://EDais.mvps.org/ Mad Scientist Jr--
Did you mean that you want to know the allocated size of the array, or how many values you have put into the array? Also,what type of array is it: is it an arrayList member or just something like String()? If it is like an arrayList, then you can just access the property: arrayList.items.count. if it is an array like string() then you have two ways to tell. You can either use: 1) arrayName.length() The method arrayName.length() will give you the number of elements available in your array -> the size created. For example if you did : redim arrayName(9) then arrayName.length() would return 10. or 2) UBound(arrayName). This method returns the upperbound number for your array. For example if you did: redim arrayName(9) then UBound(arrayName) would return 9. As far as I know, there is not a way to determine from the array the actual number of elements YOU put into the array declared like string(), because when you give it an actual size, there is a default value that is always inserted, so every item actually has a value. Hope that this helps. --mhos "Mad Scientist Jr" <usenet_daugh***@yahoo.com> schrieb Check it's Rank property. Usually this is only necessary if the type of the > I want to check that an array passed in has a certain number of > dimensions - is there a way to check for this in framework 1.1 ? parameter is 'Array', not integer() or integer(,) which implicitly determines the number of dimensions. Armin Yes, rank was what I was looking for.
PS I am posting thru the google newsgroups site (groups.google.com), and it is saying that this group is microsoft.public.dotnet.languages.vb - i'm looking at it on my screen right now. Go to groups.google.com and search for "array - how do you get the number of dimensions?" and you'll see the group name... so don't blame me, blame the goog! It is not my intention to clog up the wrong groups with irrelevant posts Show quoteHide quote : ) Just for completeness, and to compound the cross-posting issue (<grin>),
here's some VB-classic info on the same requirement: The recommended approach is covered in knowledge-base article 152288: http://support.microsoft.com/?id=152288 However, you can also look directly at the SafeArray descriptor, taking account of whether it's provided via a Variant, and whether it's a static or dynamic array (descriptor at different Variant offsets): http://www.devx.com/vb2themax/Tip/18265 Tony Proctor Show quoteHide quote "Mad Scientist Jr" <usenet_daugh***@yahoo.com> wrote in message news:1140030496.370228.298050@o13g2000cwo.googlegroups.com... > I want to check that an array passed in has a certain number of > dimensions - is there a way to check for this in framework 1.1 ? >
Resize problem (in IDE)
Broken References Barcode Reader Application -- HELP Windows Services works for years/months/weeks, then chokes New bee:How do i make an .exe file in VS 2005? DimeAttachment save to disk Using a Structure in a Class Zoom in Cephalometric system Problems with Excel Object Library Connection Properties Dialog Box? |
|||||||||||||||||||||||