473,395 Members | 1,649 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to divide string by string tokanizer class in c#

pls tel me...
I have to store data to heap file from a simple file.my file contain numeric data and string data...i have to divide tha data into numric and string. i.e.


my file contain data
1 meena
2 Sheena
3 teena


as per heap class syntax i have to brk the data into key and value.
keys are:1,2,3
values are:meena,shenna,tenna


pls help me to solve this prob
Aug 17 '07 #1
1 4261
HTB
13
Try this,

Hashtable table = new Hashtable();

string input;

while( ( input = reader.ReadLine() ) != null)
{
string[] tokens = input.Split(' ');

table[ tokens[0] ] = tokens[1];
}
Aug 17 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Jack Smith | last post by:
Hello, I am working on the following problem. I need a divide and conquer algorithm to solve the following problem. Any help is appreciated. I have a set of coordinates (x,y) and each...
4
by: atse | last post by:
Hi, I have a string: mystring="1234,5678,985,21544,55524,11264, ... ," How can I divide this string into 1234 5678 985 .... 11264
1
by: Blace Ice | last post by:
HI, Pls. see the following function declaration: int foo(const char *); How to get the return typename and parameter typenames from the declaration? For example, I need some codes like the...
8
by: Kevin | last post by:
Dim X as int32 Dim Y as int64 X = Y / 1024 gives me the error: "Operator is not valid for type 'UInt64' and type 'Integer'." I'm new to VB.NET and this is one of the reasons why I've...
8
by: gavinstone007 | last post by:
Who can solve this? Wrte a class number which represents all numbers. Implement member functions to carry out the following arithmetic operations on class instances, add- which returns an object...
40
by: Spiros Bousbouras | last post by:
Do you have an example of an implementation where sizeof(short int) does not divide sizeof(int) or sizeof(int) does not divide sizeof(long int) or sizeof(long int) does not divide sizeof(long long...
1
by: Justin.Velazquez | last post by:
Hello everyone, I'm not really new to programming but my bitwise skills definately need work. I came across a problem I've been trying to figure out for fun. I'm trying to write a routine...
1
by: vsen123 | last post by:
hi I got this error: "Divide-error Exception 0x3D27:0x14D3 Resumable Processor Fault" in Turbo C++ 4.5(Win 16) in a program that uses multi-level Inheritance. The problem occurs when I try to...
2
by: programmo | last post by:
I need to divide in two string an article, to split in more pages: I have this string: <hello word> <hello word2>
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
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
0
BarryA
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.