|
RahulRKulkarni wrote: But i think it is not in the framework-1.1
You're right, it's new in Framework 2.0.
Perhaps you can use IndexOf("***") in combination with Substring.
|
|
|
|
|
Use a regular expression:
Regex re = new Regex(@"\*\*\*");
string[] splits = re.Split(tosplit);
Logifusion[^]
If not entertaining, write your Congressman.
|
|
|
|
|
I know dictionaries don't accept duplicate keys, but hashtables are inherent within dictionaries. If the answer is yes, then what data structure could I use?
|
|
|
|
|
honeyman_can wrote: what data structure could I use
One possibility is a hashtable whose values are ArrayList s list of values. When you try to add a duplicate key, append the key's value to the existing list.
/ravi
|
|
|
|
|
Hashtables dont except duplicate keys, and im not sure there is a class that would allow you to store items in order and allow duplicated.
U could try deriving a new class from the HashTable table and replacing the comparer property with a new one that will allow you to add duplicates.
|
|
|
|
|
I have a simple question. If I have a form with some buttons inside, how can I recieve keyboard messages for the arrow keys? If I hook the KeyDown event of the parent form, I recieve notification just fine, until I press one of the buttons, at which point the event is no longer triggered; the focus jumps through tab order instead.
Joel Holdsworth
|
|
|
|
|
Im not a 100% sure on this, but the form has a KeyPreview property. This passes the keyboard presses to the form before passing to the active control.
|
|
|
|
|
Yes I've got it set already, but it doesn't help!
Joel Holdsworth
|
|
|
|
|
Have u tried overriding the DefWndProc (or WndProc) methods to detect the key presses there.
|
|
|
|
|
Hi. How do I created an update installer. Say I already installed the whole app on the client machine, made a few changes, no I just want to update their app, I don't want to remove the whole app and re-install.
Thans in advance
He who laughs last is a bit on the slow side
|
|
|
|
|
The .Net setup wiz allows you to 'update' the app. When you change the version number, the product gui will get updated, while the upgrade gui remains.
|
|
|
|
|
Hi
I want to merge two avi file and save the result on disk.
With "merge" I mean enqueue the content of a file at the end of another.
heeeeeeeelp me please
PS:...excuse me for my owful english...
|
|
|
|
|
You can search in google for "VirtualDub".
There is also with source code in it. But in C++.
|
|
|
|
|
Hi
What is the best way for remove item from System.Collections.ArrayList (most rapid) :
Remove(object Obj) or
RemoveAt(int Index)
Thank
|
|
|
|
|
What dou you mean with the "best way" ?
If you have the object, the best way is Remove(object obj);
If you have the index, the best way is Remove(int index);
|
|
|
|
|
RemoveAt(int Index) faster, look at the following code of Remove(object Obj):
<br />
public virtual void Remove(object obj)<br />
{<br />
int num1 = this.IndexOf(obj);<br />
if (num1 >= 0)<br />
{<br />
this.RemoveAt(num1);<br />
}<br />
}<br />
As you can see Remove(object obj) actually calls to RemoveAt(int Index)
|
|
|
|
|
|
RemoveAt() is safer in case the ArrayList contains duplicate objects.
/ravi
|
|
|
|
|
Hello I have a CSV file which contains matters like
"Title","First Name","Last Name","Address","City"
"Mr.","Yogee","Talokar","007,A-Wing,M.G road","Pune"
"","Radhika","Talokar","007,A-Wing,M.G road","" etc.
I wana to split it & seperate First Name,Last Name,Address,City etc,.
I tryed it by using delimiter ","
but it also split "007,A-Wing,M.G road" like
007
A-Wing
M.G road
I dont want to split "007,A-Wing,M.G road" ,bcos I have to count no. of strings.
is there is any other way to split it Like
"Yogee""Talokar""007,A-Wing,M.G road"
"Radhika""Talokar""007,A-Wing,M.G road"
-- modified at 5:59 Friday 28th July, 2006
Yogesh_T
|
|
|
|
|
Why don't split it by "," ?
Then you will have an array like:
"Mr.
Yogee
Talokar
007,A-Wing,M.G road
Pune"
Now you only have to delete the first and last " and you're finished. or if you want to add the " , you can simply add them to every one of them (except for the first and the last one) in the beginning and the end of the string.
|
|
|
|
|
is there any way to split by string like ", not by char ,
Yogesh_T
|
|
|
|
|
You can use the string.Split(string[] seperator, StringSplitOptions options) version of split. Use StringSplitOptions.None in the second parameter, and in the first parameter you put you delimiter.
|
|
|
|
|
You have used the wrong delimiter. That means in your text, you must write something but not delimiter. Just take another delimiter, like ";".
|
|
|
|
|
I use this regex:
Regex regExp = new Regex(",(?=(?:[^\"]*\"[^\"]*\")*(?![^\"]*\"))");
|
|
|
|
|
Hello Sir Its nice one ,Its working properly.
Thanks for this.
but I am unable to understand this code ,could u plz explain it or give me site referance for this.
bcoz I have a file like
"G.H.",,"","","",,,"Company Friend
Office
Lute
",,,,"Normal","False",,,"Normal"
//my code is
StreamReader r=File.OpenText(file_location);
strUserInfo = r.ReadLine();
if( strUserInfo != null)
{
Regex reg = new Regex(",(?=(?:[^\"]*\"[^\"]*\"])*(?![^\"]*\"))");
string[] split = reg.Split(strUserInfo);
//code
}
in this it read above code as 5 lines(in CSV file it seperate "notes" field) but it should be only one line,what should I do for this?
Thank you again
-- modified at 4:00 Wednesday 2nd August, 2006
Yogesh_T
|
|
|
|