string() = string()

this code does not work (not instance of object)

Dim Items(), Other() As String

Items = New String() {"A","B","C"}

Other = New String() {}
Other = Items
how can I get all the values ?

10/29/2003 8:32:36 AM 3721 articles. 0 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 8
Get it on Google Play
Get it on Apple App Store


If I understand your requirement correctly, this should do it

Dim Items() As String = {"A", "B", "C"}
Dim Other(Items.Length - 1) As String
Items.CopyTo(Other, 0)

To more closely match you code above, but this will be less efficient

Dim Items(), Other() As String
Items = New String() {"A", "B", "C"}
ReDim Other(Items.Length - 1)
Items.CopyTo(Other, 0)

Hope this helps
Chris Taylor

My Blog
10/29/2003 10:06:30 AM
in that case you get a ´non reference of object if you try to use Other()
10/29/2003 10:44:58 AM

Similar Artilces:

Visual Studio .Net? Visual Basic .Net?
Okay, I admit it -- I know nothing about .Net. I'm a Visual Basic and ASP developer. DotNetNuke is my first tentative step into the whole ".Net Thing", and I'm looking for some advice... What do I really need to be able to make some modifications, or new modules for DotNetNuke? Do I need the full, THOUSAND DOLLAR Visual Studio .Net 2003 package, or can I get away with the HUNDRED DOLLAR Visual Basic .Net Standard package?Chameleon Systems, Inc. You can use webmatrix, available here for free. One of the drawbacks of webmatrix however is that it does not support code-be...

Visual Basic.NET or Visual Studio.NET?
OK, this has probably been asked before... I'm a student looking to cut my costs, and I can do this by just purchasing Visual Basic.NET as opposed to the fully-fledged Visual Studio.NET application. Of course, I'll only be able to program in VB, but that's fine with me. I wanted to know if all of the ASP.NET specific options are available, such as using a WYSIWYG editor? I'd also like to know if VB.NET has IntelliSense, or that's a specific option only available to Visual Studio.NET users. Thanks in advance. I'd have to believe that VB.Net has intellisense. What is the price d...

Visual Basic.NET or Visual Studio.NET? #2
I am currently using the Web Matrix to develop ASP.NET applications, but I am keep to upgrade to VS.NET. However, I can't justify spending $1,000 at the moment. I then found the MUCH cheaper "Visual Basic .NET 2003 Standard Edition" which is only $100. I have very little C# knowledge, and use Basic almost all the time. Would this be a good tool to use for web development? Does it support all the code behind stuff that VS users love so much? Thanks!! I use "VB.NET Standard Edition" and I'm happy with it. It has exactly the same features as Visual Studio.NET. Th...

Visual Basic .NET 2003 vs Visual Studio .NET 2003
Hi, If im going to be coding my ASP.NET in just VB.NET then would I be able to go for the cheaper option of buying Visual Basic .NET 2003 ?? - Carl S Yes.Starting with ASP.NET 2.0? Look at:Programming Microsoft Web Forms My Blog Are there any limitations if I was doing my ASP.NET with VB.NET in Visual Basic .NET 2003 than if I was using the full Visual Studio .NET 2003 ?? Or are the only advantages of Visual Studio .NET 2003 in that it supports more programming languages ?? - Carl S You should check the MS Web site, but I believe that, given an edition (Standard, Professional...

ADO.NET Programming in Visual Basic .NET
Has anyone read "ADO.NET Programming in Visual Basic .NET, Second Edition" by Steve Holzner (Author), Bob Howell (Author)? I am trying to working on a project and there are a few things that I need to tie up quickly in my web forms. Is this book a good one? karls------------------------------------'Old and wrinkled is not what I expected to become when I grew up!'...

Converting Visual Basic 6 to Visual Basic .NET
Hi, I found this program that would get the mac address of a computer given its IP. I converted it into and it gave 2 errors. It said that I couldn't use "any" in declarations, so I found out what variable it was tryign to pass and changed the any to that data type. Now, the program will start in but when I click the button, it returns the wrong mac address, while the one in vb6 returned the correct one.All you have to do is add 2 textboxes to the form and 1 button, dont change their names.::::::::::VB6 CODE::::::::::Option ExplicitPrivate Const NO_ERROR = 0Private Declare F...

C# Visual Basic.NET JScript.NET what should I choose ?
I'm just a beginner with programing ASP.NET web sistes. Unfortunatelly I don't know any of the languages supported by ASP. (By the time I programmed in DELPHI and SQL) So I should start to learn one of the languages. Could somebody help me to choose the language I should use ? Which and why ? Thanks in advance, Gonzi Use C# or VB.NET, which ever you are comfortable with. Go here to see sample of both in use Ultimately, once you get more advanced, you'll really want to become comfortable with both languages. I ...

String and String[]
What will be the advantage of using myString: String[10] over myString: String Man wrote: > What will be the advantage of using > myString: String[10] > over > myString: String "String[10]" is a fixed-length, statically allocated, Ansi-based ShortString. "String" is a dynamic-length, dynamically allocated, reference counted, Ansi-based or Unicode-based (depening on Delphi version) Long string. Unless you absolutely need the static, fixed length nature of ShortString, such as in records that interact with external systems, you should stay ...

String and string?
Hi guys, I was wondering the difference between small letter string type and a capital letter String type. Does anyone know about this? Highly appreciate for your answers! Thankz! The "proper" version is String, as it references the System.String class of the .NET Framework Class Library. The ability to use string is provided by C#, where it is an alias to String. Similarly, the "proper" version of an integer is Int32, as it references System.Int32.  The ability to use int is provided by C#, and the ability to use Integer is provided by VB.NET, and both int and Integer are aliases...

string and string[]
hello, whats the difference here between string and string[] thanks "string" denotes an item of type String "string[]" denotes an array of type String itemsThanks, EdMicrosoft MVP - ASP/ASP.NET Gracia mon ami...

string to string[]
Hi, I've got this code : string[] Params; string SQL = "SELECT * FROM T_MANAGEMENT_PAGES"; SqlCommand myCommand = new SqlCommand(SQL, myConnection); myConnection.Open(); SqlDataReader myReader = myCommand.ExecuteReader(); try { while (myReader.Read()) { Params_Type = myReader.GetValue(0).ToString(); } } catch { } finally { } myReader.Close(); My problem is to obtain Params_Type. But each time, it says : "impossible to convert '[object]' in 'string[]' &quo...

Can I go from VS .NET 2003 to Visual Basic .NET 2003?
Hi, I just developed a commercial application using the trial version of Visual Studio .NET 2003.  My trial is about to expire.  I was hoping .NET 2.0 would be released by now, but that is obviously months away so I'm wondering if I could save a few hundred bucks by buying Visual Basic .NET 2003(around $110 i think) instead of having to buy Visual Studio .NET 2003, which I believe is up around $600 or so.   All my code is Visual Basic, so that's why I'm thinking that's all I need.  And it's mostly web development that I do if that matters.  T...

Visual C#.Net vs Visual Studio.Net
I have read in other posts a lot of people recommending Visual Studio.Net over the Web Matrix. My query is: why is there a £700 difference between VS.Net and Visual C#.Net? As a c# developer, I won't need any VB functionality. I also don't require Visual Source Safe, as projects are generally small and manageable. What features are lacking in Visual that justifies the price difference? Does it have Intellisense / Dubuggers / Compilers? These are the features that would make me pay for it instead of continuing with WM, but I need to know if tehre is serious functionality missin...

How can i write this line: string[] nicks = new string[ users.Count ];
How can i write this line: string[] nicks = new string[ users.Count ];  - using when: users = new Hashtable();   and also what the diffrence between: users.count and users.keys.count? Dim objHashTable As New Hashtable() objHashTable.Add("FName", "Bino") objHashTable.Add("LName", "Bose") objHashTable.Add("PNumber", 9895612345) This way you can add items to a hashtable in Mark as Answer if you find the post useful. Dim Users As New Hashtable() Dim str As String() = ...

Web resources about - string() = string() -

The GOP Establishment Has Found The One Thing That Can Make Donald Trump Palatable: Ted Cruz
Huffington Post The GOP Establishment Has Found The One Thing That Can Make Donald Trump Palatable: Ted Cruz Huffington Post The Republican ...

ESPN exec: Sling TV 'significant' but Apple is 'frustrated'
ESPN has come of age in the cable era, but as internet TV grows and cord-cutting continues, its future is suddenly fuzzy. President John Skipper ...

Inspector General: Hillary Clinton’s Emails Contained Highly Classified Intel
Hillary Clinton’s emails are like a ghost that just won’t stop haunting her. For several months now, the former Secretary of State has been forced ...

Star Wars Toys Brought in $700 Million in 2015
Star Wars toys were the hottest property in the toy industry last year, generating hundreds of millions of dollars of sales, according to new ...

Governor's Emails Show Debate Over Blame for Flint Water
Emails released by the Michigan governor show that Rick Snyder's chief of staff told him last fall that the "real responsibility" for the Flint ...

Astronomers' findings point to a ninth planet, and it's not Pluto
Los Angeles Times Astronomers' findings point to a ninth planet, and it's not Pluto Los Angeles Times This artist's conception illustrates ...

Mumbai records year’s coldest day
The minimum temperature recorded is more than four degrees below normal, making it one of the coldest days recorded in the city this month.

Cheap Oil, Good for Consumers, Is Slamming Stocks. Why?
A plunging price of oil is dragging stock markets to their worst start to a year ever, even though low fuel prices are great for consumers and ...

WWE Rumors: Daniel Bryan Returns, AJ Styles Debuts, ‘Royal Rumble’ — Biggest Week In WWE History?
Rumors always fly around in the world of professional wrestling, but there are a lot happening right now. Actually, there are so many things ...

Satellite pictures suggest oldest Christian monastery in Iraq razed to ground
CNN Satellite pictures suggest oldest Christian monastery in Iraq razed to ground CNN (CNN) A 1,400 year-old Christian monastery the oldest ...

Resources last updated: 1/21/2016 7:50:39 AM