How can i write this line: string[] nicks = new string[ users.Count ]; - using

How can i write this line: string[] nicks = new string[ users.Count ];  - using


users = new Hashtable();


and also what the diffrence between: users.count and users.keys.count?

12/18/2008 3:28:43 PM 91979 articles. 4 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 33

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 VB.Net

Please Mark as Answer if you find the post useful.
12/18/2008 3:51:25 PM
Dim Users As New Hashtable() 

Dim str As String() = {Users.Count.ToString()}

MAKMark as Answer if this reply helps you
ASP.Net Hosting : Host DepotMy Site : ASPSnippets
12/18/2008 3:55:26 PM

Similar Artilces:

getting value from string (VB .net)
HiJust a quickie (i hope) - i'm trying to get a value from a string but not sure what method to use.Eg Dim myString As String = "(ng) nottingham"How would i get the value between the parentheses - ng?  The values are either going to be a single or two characters if this helps?I can think of a work around using myString.IndexOf() but i'm sure there must be a specific function for this problem? thanks  Hey, You could loop through the three or four characters, use the Substring method and trim/remove the parens, or you can use regular expressions.Brian"Trust in the Lord a...

multiple line string in VB.NET
In C# I can do, string s = @"For a brief description of, see the ' topic of the Help file.  To view this, start', switch to the Classic interface if necessary, and choose Help Contents and Index from the Help menu. For a listof changes in this version, see"; Is there anything similar in VB.NET?     No that I know of. That is to escape the inner characters. Although your example does not demonstrate it, here is a good example:   string s1 = "a\nb";        // outputs: a {new line}b string s2 = @"a\nb";   &nb...

how can i Get OCX File in .net IDE
hi all,      How can I generate OCX file in 2005 that will interact in web pages...?Thanks & Regards,Murthy. Hi murthysrn, As far as I know, VB 2005 and C# 2005 cannot create the project for ocx file. However, I hope the following link will be helpful to you. Creating an ActiveX Control in Visual Studio 2005,Benson YuMicrosoft Online Community Support Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other co...

VB.NET: Get the Attribute and Text out from Xml string
Edited by SomeNewKid. Please post code between <code> and </code> tags. Say I have this Xml taken as an example: <Settings> <Connection> <UserID>sa</UserID> <DataSource>Server</DataSource> <InitialCatalog>Database</InitialCatalog> </Connection> </Settings> To get the Xml text is: Dim m_xmld As XmlDocument Dim m_nodelist As XmlNodeList Dim m_node As XmlNode m_xmld = New XmlDocument() m_xmld.Load("Settings.xml") ...

How Do I upload string to a website in and get response for processing.
Am developing a program which requires my code to call a website pass some authentication for the site to give me back my activation code. I have already written the page in php. How can I give add those parameters such that I will be able to retrieve ti with POST command of PHP? How do I get the response for additional processing? Thanks ...

What can do that can't?
That's pretty much my question - what can you do with c#, in terms of web application building, that you can't do in Thanks Which language you choose is pretty much up you, your preferences and previous experience. There are some differences, but most importantly one have to realize that all .Net compliant languages are translated into an Intermediate Language and at the end of the day, what run is pretty much the same. Read this if you need to know more: "Microsoft Programming Languages" ...

how can i write this line in public class AddTemplateToGridView : ITemplate
public class AddTemplateToGridView : ITemplate   public class it's an inner class inside other class    Public Class AddTemplateToGridView    Implements ITemplateEnd ClassDon't say thanks rather mark my reply as "Answer" if it helps you ,Doing so u'll get points tooamiT jaiNC#.NET Articles...

how can i write this line in [serializable] public class helloWorld
[serializable] public class helloWorld { } how to write serializable in like this: <Serializable()> Public Class helloworldMike Banavige~~~~~~~~~~~~Need a site code sample in a different language? Try converting it with:

m_AVP As IDictionary(Of String, String) = New Dictionary(Of String, String) ,not defined?
   I am creating a usercontrol (ascx,ascx.vb)   I have used Imports system.Collections Imports system.Collections.Generic     Private m_AttributeValuePair As IDictionary(Of String, String) = New Dictionary(Of String, String)     But I am gettting an error “Type Dictionary is not defined”   And also I am getting intelisense to type the line But what is the reason for my error ? How can I get escape from the error ?         this error is not showing today  ...

How to get RS (From VB6) to .NET (VB.NET)
Hi Friends,         I have requirement, there is one function in VB6 it returns a RS, I need to call that function in  VB.NET, how to get those values into .NET, if can any body can help (pass me some code snippets), that will be greate, Thank you.Madhu... -Madhu hey guys i got this one just by using fill method.-Madhu...

Can VB.NET and C#.NET combined?
Hi, I have a web application so far written in VB.NET using Web Matrix. I need to create a chat program like MSN ... but I wish to use C#.NET to create this chat program, so I can learn about it ... can I combined VB.NET and C#.NET in the same application? Hello, I thought you could have a look at this: Mixing VB and C# in same Web Application regards.Bilal Hadiar, MCP, MCTS, MCPD, MCTMicrosoft MVP - Telerik MVP I don't recommend mixing the two in the same application (if is even possible), but what you can do is encapsulate all of your logic into an asembly (dll) written in c# and ...

what is new in vb net for Net 2.0 ?
where can I find an article with all what is new in vb net for Net 2.0 ? thank youangiras ????,Teemu KeiskiFinland, EU...

Count no of strings in a string
dim ref as string ="<a href=""/iyp/yp/" hi i would like to know something how do i count the number of ref in a html document??you see i have another string call htmldoc(it contains a html document of a web page) and i want to extract all the ref in htmldoc how do i do that? 2) How do i include a closed inverted comma in a string?? dim a as string = "abcde"fghijk""" How do i use the mid method to seacrh from " ?? 1) You should learn about Regular Expressions 2) Double the quotes: "abcde"...

vb wont let me write this to a string so that i can then write it to a text file.
  I'm trying to write the following to a string in, but the script thinks that its code and generates errors when i try and write it to a string. Here is what im trying to write to the string: Dim mystring = "<div class="message">Message 1</div><div class="message">Message 2</div>" Is there any way i can do this?  also just to add, I dont want to remove any of the tags in the process.. is this possible?   dont worry just figured it out:Dim mystring As String = "<div class=""...

VB.NET string format
Hi guys, I'm having some trouble getting some contents of a string and wondering if anybody could help I've got a string of mail addresses, e.g.     ";;"I need to get each seperate address and add it as an address like so:  for each addressfound mail.To.Add(outputstring)  end for I haven't been able to find any good formatting functions so far. How would I go about doing this? Thanks in advance!!  Check out the String's Split method. It takes an array of delimiter chars for a parameter--among other overlo...

Web resources about - How can i write this line: string[] nicks = new string[ users.Count ]; - using -

Obama optimism over climate pact tempered by GOP opposition
WASHINGTON (AP) — President Barack Obama and Secretary of State John Kerry hailed the newly passed international climate change agreement as ...

SNL‘s Greta Van Susteren Suffers Through Ted Cruz, Chris Christie, and Ben Carson
Ted Cruz ‘s media moment has arrived, if this week’s Saturday Night Live is any indication. On the sketch show’s version of Fox News’ On the ...

Fire damages Calif. mosque; man, 23, arrested Fire damages Calif. mosque; man, 23, arrested COACHELLA, Calif. - A Southern California mosque was damaged in a fire ...

Did Daisy Ridley Get Any Advice from Harrison Ford About 'Star Wars'? Find Out Here!
Daisy Ridley shows off her cool patterned dress at the Star Wars: The Force Awakens premiere held at the Sheraton Grande Tokyo Bay Hotel on Friday ...

Saudi Arabian women vote for first time in local elections
Reuters Saudi Arabian women vote for first time in local elections Reuters RIYADH Saudi Arabian women voted for the first time on Saturday ...

Atleast 21 Dead, Dozens Injured In Russian Hospital Fire
International Business Times Atleast 21 Dead, Dozens Injured In Russian Hospital Fire International Business Times Russia-fire At least 21 ...

FBI Concludes Search of San Bernardino Lake
FBI Concludes Search of San Bernardino Lake

Derrick Henry offered a winning combination for Heisman
ESPN Derrick Henry offered a winning combination for Heisman ESPN NEW YORK - Like every little boy who ever ran in a front yard with a football, ...

'American Horror Story' actress Rose Siggins dead at 43
Rose Siggins, who played a legless character on American Horror Story: Freak Show, died Saturday in Denver, a representative said.

Gambia's president declares country Islamic republic - The Hindu
Gambia’s President has declared the tiny West African country an Islamic republic, saying he decided this because Islam is the religion of the ...

Resources last updated: 12/13/2015 9:02:58 AM