|
|
Ignore what I posted before, Simon's HashSet<string> is perfect, and it has the ToArray if you need it.
Leaned something new today
|
|
|
|
|
HashSet is only in .Net framework 3.5 and i;m using vs2005
But the advice is soo great, thx to all
|
|
|
|
|
Take a look at the HashSet<String>[^] class (.net 3.5 only). It provides an optimised hash collection and it doesn't allow duplicates, (it just ignores attempts to add duplicates), and you can call ToArray() when you are done with it if you really need a string array.
Simon
|
|
|
|
|
Nice find Simon, hadn't come accross this one before... always good to learn something new
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
How could we know if SQL Server express is installed with c#? Thanks
|
|
|
|
|
|
Wow thanks. I'll give it a try. I tried using registry before and it failed.
|
|
|
|
|
Why? If you need to connect to a database then try connecting to the database; if it succeeds, proceed; if it fails, tell the user.
I don't see how knowing whether or not the expected database engine is installed and running will help.
|
|
|
|
|
I've written a windows application that is periodically verifying the Inbox folder from Microsoft Outloox ( within an interval of 60 secounds ). This application is working and it does exactly what it has to do.
The problem is that the same code putted in a windows service ( the declaration and initialisation of the Outlook Objects are the same in both cases ) seems not to be working, because the Outlook Object is not initialising corectly.
At the time of initialisation only it throws and COM exception.
So..were i go wrong? I will apreciate any advice.
P.S. I've tried to put the collecting function in a Class Library (DLL),and it's still not working.
|
|
|
|
|
try this link
http://support.microsoft.com/kb/237913
hope this will help you
na
|
|
|
|
|
Hi,
I have developed an application that inserts lots of data from a spreadsheet to a database. I would like to create a report (in notepad or anything) that states how many records were successfully inserted, failed, etc.
Can anyone assist me accomplish this?
Regards
Mvelo Walaza
Developer
Telkom SA
modified on Monday, November 17, 2008 6:59 AM
|
|
|
|
|
can you please tell us which database you are using.
na
|
|
|
|
|
I am using Oracle.
Toad for Oracle Version 9.0.1
Mvelo Walaza
Developer
Telkom SA
|
|
|
|
|
How can i connnect a home phone to a C#.net application sach that the application can answer the phone automatically and can send a call automatically
|
|
|
|
|
You're going to need cabling, and a whole hunka code.
|
|
|
|
|
Hi.
I need help with this thing.
I have a code in a form and the code has something like this:
CODE
CODE
CODE
SHOW some a new form and WAIT!! for the user to enter data
CONTINUE WITH THE CODE WHEN THE DATA IS ENTERED/SELECTED
CODE
CODE
CODE
..
..
Ok, i solved this with show dialog, but then the dialog gets full priority and the user CANT read and see data in the background-main form (it freezes or something).
How can this be solved with just Form.Show() and not with showdialog and the code after the request for show form to wait for data to be entered in the other form.
Thanks in advance.
Regards,
Matjaž
Força Barça!
|
|
|
|
|
|
No,this is not it or its just me and not knowing how to find an anwser from that good article.
Let me explain this one more time...
Yes, it should be checked between two forms, but the code should be paused until the user enters data. But the main form should be also avaliable for him to operate, move and view whats in it (as with dialog, this form is paused totaly and u cannot read something from it - frozen).
Any other suggestions?
PS: im a newbie, so i dont understand advanced classes and methods of C# :/
Força Barça!
|
|
|
|
|
First of all, if you can't understand how to use the article I posted, it's not a good thing to vote someone's post 1.
Secondly, you should structure your app like this:
somemethos()
{
//Do some stuff
subscribe to the form's event which is triggered when data in form2 changes
show the form2 here using Show()
//no more code after calling show.
}
eventhandlertodatachange()
{
//This is the eventhanlder you subscribed to
//Run the code you need here.
}
|
|
|
|
|
Great. This will work.
Im sorry about that, but didnt know really what that does so it was the first time i clicked it.
The second answer is more understandable to me.
Thank you for taking your time and helping me... now im back to work.
Regards,
Matjaž
Força Barça!
|
|
|
|
|
Glad to help you. Please reply if you need more help
|
|
|
|
|
Hmmm ok ... went back to work on my project and yet again, i stopped. Maybe its just one of those days when ive got a block in my head to think straight or something... (yeah, the weather is bad and weird) but still didnt find the solution.
I googled some more and found something with AsyncCallback, which could be also a solution to my problem and i saw in your signature that u've made an article about using Asynchronus registry notification...
If youve got some knowladge about it... can you please, write a small sample for me with two forms using async or anything else? I know im asking a lot and i know your time is prescious as everyones else, so if you dont want to... no problem. There is no fire burning and theres no rush. If i just wont find a solution, i'll drop this project.
Main has button and a lable. The form2 has textbox and a button.
on main the user would get prompted with something like ShowDialog (pause the code but not freeze the main window) after clicking ona a button, with the form2 to enter data.
the main would not freeze but the code after the row, which would prompt him with form2, would simply pause, until the user would enter data and exit in the same action of buttonclick.
complicated, i know.
Regards,
Matjaž
Força Barça!
|
|
|
|
|
You can subscribe to FormClosed event of the form2 before showing it to get notified when it is closed.
|
|
|
|
|
but wouldnt that still make the code on the main form to continue? i need a loop to keep checking... or not? i guess im stupid lol.
Força Barça!
|
|
|
|