|
I don't understand.
What should happen?
What actually happens?
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
You are making an assumption in the line String Nht = Nhat[0] that you actually have an entry. Before you do this, you need to make sure that Nhat actually has entries in it.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
but why when I debug,Nhat[] have contained data( data is a String)
|
|
|
|
|
Because you are using GetCurrentDirectory. Here's a hint - pop up a message box to say what GetCurrentDirectory contains in the release version.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
|
Whatever happens, don't give us any details.
If a dialog box tells you something, don't tell us.
If an Exception fires, don't reveal its message.
If you did, we might be able to help you; that can not be what you want...
|
|
|
|
|
I know its a silly ques.
I've got treeview control which holds different class names.
In normal ways what we do is.
Ayclass cls= new AnyClass();
now the AnyClass's name is stored in a variable. how to instantiate a class.
here's the failed code.
string varClass= treeview1.node.ToString();
varclass d= new varClass();
Hope I make myself clarify.
|
|
|
|
|
Normally you don't do this at all. It's possible using reflection, but having to use reflection is usually an indication that you are doing something backwards.
What is it that you are trying to accomplish, really? You should ask for a solution for that, instead of asking about the way that you think that it's solved.
---
single minded; short sighted; long gone;
|
|
|
|
|
If you are sure that's the way to go (see post from Guffa) then this is how it's working:
object d = Activator.CreateInstance(Type.GetType(typeName));
see help on CreateInstance for further information.
-^-^-^-^-^-
no risk no funk
|
|
|
|
|
here's what I want.
here's chart reports in treeview control for end user to display.
Sales_Monthwise
Sales_Citywise
sales_PartyWise
when a user clicks Sales_Monthwise I want open Charting Class with the same name.
one possible way is:
if (treeview.node.text == "Sales_MonthWise) {
Sales_Monthwise sm= new Sales_Monthwise();
sm.Show();
}
bcoz there are so many classes I don't want to insert logic for every class.
|
|
|
|
|
|
Hi all,
Can i get some notes or some article link on .NET Threading.
Thank You,
Regards
Chintan
www.visharadsoft.com
(Nothing is so purify as KNOWLEDGE)
|
|
|
|
|
I'll let you in on a secret (I know its a secret because it seems theres a lot of people who don't use it before asking here), theres a wonderful site called google[^].
|
|
|
|
|
|
Now you ruined it! That was supposed to be THE secret!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
See this[^] article.
/ravi
|
|
|
|
|
I'll let you in on the biggest secret of all (I know its a big secret because
it seems only few people are aware of it): there is a Search box on top of almost
every page on CodeProject.
Don't use it; if you do, you may run out of simple questions to ask us.
|
|
|
|
|
i have a main form which contains 5 tab pages in each tab page i have a list view. now if i open another form from main form using childform.showdialog() and then i close the child form then the main form flickers, i dont know why? but if i open the same child form from main form using childfrom.show() then close it the main form doest flicker but the show method allows multiple instance of child form which is not so in showdialog(). Now what should i do in order to open single instance of child form and not flicker the main form when the child form closes.
thank you
|
|
|
|
|
I believe there is a property "DoubleBuffering" or something in the forms properties.
Set it to true. Maybe that helps.
V.
I found a living worth working for, but haven't found work worth living for.
|
|
|
|
|
Hi There
I need help to get started making a simple addin for Word. I need to add a command in menu that appears when I right clicks, so I can execute some of my own code.
I'm tryin to do so using VS2005 (C#) and VSTO2005. But I can't find any samples that leads my in the correct direction.
Can anyone helt me, please?
__________________
John Reinhold - DK
|
|
|
|
|
use ContextMenu. assign some text as menu in it.Now there is one property in form class.so assign Context menu name in its Context menu property.
u r done!!
Regards
Chintan
www.visharadsoft.com
(Nothing is so purify as KNOWLEDGE)
|
|
|
|
|
Whau - that was fast!
Thanx, Chintan.
What you wrote is in a very short form. Unfortunateliy, I'm learning as I go. Do you know where I can get a complete sample solution showing how do to?
__________________
John Reinhold - DK
|
|
|
|
|
Hi all.
I have an application which will recieve ids from some other application.
Now i need to store the incoming ids to a string builder, so that i can use it for later use.For this i have created a string builder as follows
stringbuilder strIncomingEventID=new stringBuilder()
and inside the receiving method i used the below stmts
strIncomingEventID.Append(incomingmessage + Convert.ToChar(FIELD_SEP) )
now i want to retrieve each ids from it..for my manipulation...
i am not getting split properties or any thing which is useful..can any one help me in this .One more thing is that i am appending a constant FIELD_SEP to end of incoming message when i store , so that when i want to retrieve the ids ,it will be useful..is it right method.Please advise me how to get the value from the string builder
Thanks in advance
Regards
DilipRam
|
|
|
|
|
Can't you store the IDs in a List<string> as they come in. YOu then have a list of IDs and can use this to build your string for storage at teh end.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
|
|
|
|
|
A StringBuilder most of the time is used to improve the performance when a series
of operations needs to be performed on textual data, that would otherwise be
stored in a string (each operation would create a new string object and copy
its data). Ultimately, when the assembly of the string is done, one normally
converts the StringBuilder to a string using the ToString() method.
Since your string operation is very simple (just a concatenation) there is no
point in using StringBuilder. And as you figured, you need a string object in
order to use the nice String methods such as Split().
[Correction: if you do this several times, there may be a performance gain
in useing StringBuilder, but in the end you have to convert back to a string].
BTW: if FIELD_SEP is a constant, there is not much point in adding it permanenty;
instead, I suggest you append it to the one string you are dealing with, when
and where you need it.
-- modified at 12:00 Friday 3rd August, 2007
|
|
|
|