|
pls be clear i cant understand....
wat should i do to get token zero for 55
the quieter u become more u hear
|
|
|
|
|
bloody hell. Buy a C# book. Read my article on how to use google. If you can't understand my answer so far, then giving you the precise code will only move you further along the line of having people you work for think you have some sort of clue. And, if you're teaching yourself, refer to point a. Buy a book, and learn to use google, so you don't ask questions that are trivial, and so you know enough to be able to apply the answers when they are given to you.
I give up.
string values = "#55;xx sterrr,yy city,india";
char[] seperators = { ',', '#', ';', ' ', '/', '\0', '&', '-' };
string[] sites = values.Split(seperators, StringSplitOptions.RemoveEmptyEntries );
foreach (string a in sites)
{
// Console.WriteLine(a);
Console.WriteLine("token number is\t{0} token'd string is\t{1}\tlength of the string is {2}", tokenIndex++, a, a.Length);
}
But, you're pretty damn stupid to not be able to work that out from what I told you, which included a description, and all the keywords you need to find a working example with google, in seconds. I confirmed this when I responded to you.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
im so sorry.... im a minor kid... just writting codes for school work..
again sorry for making u angry
the quieter u become more u hear
|
|
|
|
|
Maybe you should buy a game console and give up on coding...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
hi....
it bcz the first spliting occured by #..
here left string to # is NULL...
|
|
|
|
|
hai all,
i want to create encrypted xml in server machine through windows application ,how can i create this .
thanks& regards
vishnu
|
|
|
|
|
Check out the cryptography namespace.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
|
AoA
I was working on a project. I want to discuss a question, is it possible that we override whole definition of existing class.
Means e.g. I make my own class named TextBox. And it override the existing windows class. Whenever TextBox is written it supposed to be my class. We dont have to provide a whole path means. namespace.className.
Please help me out if any one can. Thanks in advance.
|
|
|
|
|
No, you can't do that, you can't make the entire project just magically use a class other than the one you actually used. The best you can do is a search and replace.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
yes i understand your suggestion. My requirement is i want to paint all controls by myself. I searched the net and find a way that can be possible is Hooks. But i can not find exact Paint Messages of each control. Can you help me in it. and Thanks for your reply of previous question.
|
|
|
|
|
Hooks do not do what you hope to do. The most likely thing is a using statement at the top of every class which redefines the TextBox, for example, as being an object called TextBox in your namespace instead of the usual one.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
i,ve developed a simple concurrent server and each client is handled by a new thread, after doing some function in the child thread i update the main form using a delegate, the problem is when an exception is occurred in the child thread even though it is handled my whole application get stuck. what might be the solution for this senario.
and i would like to know , once the child thread is returned is it terminated by itself or do i have to do it manually?
|
|
|
|
|
It terminates itself, I believe. Your best bet is a try/catch to catch any errors you may anticipate and which you want to ignore.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
hi...
U must terminate child thread when an exception occured.....
for more information click below link...
About Threading in c#
|
|
|
|
|
Being a bit of a beginner with .Net and c#, I have a questino on cleaning up resources. In Delphi we would free and object using Object.Free and in the scheme of things all objects had virtual method that would be overridden to clear items within that object. For examlpe i might have an object that contains a bunch of array lists, or memory streams.
I have hear of garbage collection and that C# free's up memory usage automatically,
but i'm not sure how true that is and how deep it goes.
In C# if I have
MyObject class with some arraylists populated with other objects that are created by MyObject
and i use this object in some button click for example, when the click is done will MyObject and all its other objects get released?
Do I need some special routine that the system will automatically call when it goes to dispose of MyObject?
Hope that makes sense...
|
|
|
|
|
dwolver wrote: i'm not sure how true that is and how deep it goes.
It is very true and it is very deep (but only for managed objects)
dwolver wrote: i use this object in some button click for example, when the click is done will MyObject and all its other objects get released?
Yes, eventually. The garbage collector does not run as soon as something is no longer referenced anywhere, it runs when it needs to. And then it will clean up the objects.
dwolver wrote: Do I need some special routine that the system will automatically call when it goes to dispose of MyObject?
Now, you've hit on the word I was going to mention next, "Dispose". If an object uses unmanaged resources then you must implement the IDisposable interface. This requires you to implement a method called Dispose() that is used to clean up the objects that the garbage collector cannot.
So, if you use unmanaged objects or another class that implements the IDisposable interface (like a file stream) then you are responsible for cleaning up the object.
You can call Dispose() manually, but a much neater solution is something like this:
using (FileStream fs = new FileStream(someFileName))
{
}
What happens here is that you tell the compiler that when you exit the using block to call Dispose on the object you created at the start. It doesn't matter how you exit the block. You can call return to exit the method as a whole, an exception can be thrown, whatever. The compiler will ensure that the object's Dispose method is called on your behalf.
|
|
|
|
|
Excellent answer.
I'd just stress that the key sentence is:
So, if you use unmanaged objects or another class that implements the IDisposable interface (like a file stream) then you are responsible for cleaning up the object.
Too often seen replies that say in .Net you can completely disregard memory management issues because of automatic GC.
Regards
David R
|
|
|
|
|
THe fundamentals of .NET are that it manages your memory for you. If an object does not have a Dispose method to call ( and if it does, you should call it ), then you shouldn't have to worry about memory. That's what garbage collection means.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
hi..........
Donn't worry abt memory leaks..
U know one of the important featuere of c#.NET is Its Effective Garbage Collection feature.....
If u want to know more , just click below link....
About Garbage Collection
|
|
|
|
|
helu... can we jus load a windows theme .msstyle and skin our windows form ... is there any support like that....thans...
|
|
|
|
|
People are going to hang you for using text-speak, whilst I would love to hear original answers to your question. Please rephrase it without the SMS-language, it greatly enhances your chances of getting a serious answer.
In case you didn't knew; you don't have to pay per character here
I are troll
|
|
|
|
|
He also multi-posted it seems.
|
|
|
|
|
A multi-sinner..
I are troll
|
|
|
|
|
I was searching thru the web and couldn't realy find a conclusive explanation on how to attach an event to DataGridViewButton.
Since I found the answer to my question I have decided to share it with others...
You can not attach an event to a specific DataGridViewButton. The only way to by pass this block is to use the CellClick event of the DataGridView control. By doing so, keep in mind that this event is automaticly attached to any button on the DataGridView. In order to use this event for a specific button on the row, you will need to check if the object which fired the event has the name of your desired button. Take a look at the example:
if (MyGridView.Rows[e.RowIndex].Cell[e.ColumnIndex].Name == "MyButtonName")
{
}
Also, if you notice, when you click on any row on the first cloumn (the blank one that cause a full row selection) it fires the same event. The problem is that it sends a column index of -1 which can not retrive a coulmn name. This cause an expectaion error. In order to fix it use this example:
if (
e.ColumnIndex != -1 &&
MyGridView.Rows[e.RowIndex].Cell[e.ColumnIndex].Name == "MyButtonName")
{
}
Make sure the first condition is the "e.ColumnIndex != -1".
Hope I could help anyone with this information.
|
|
|
|