hi my friend , im sorry for bothering you again . just a simple qustion i have . how should i do sth in the server side dealer.onrecived event . like lets say . close second form in that event(dealer.onrecived) before publisher.send() has executed . i want to do that but it throw an error and saying : Cross-thread operation not valid: Control 'Form2' accessed from a thread other than the thread it was created on. i know that , when im start(run) a method with a thread , i should define a delegate and then invoke the object to access it . but here i dont know how to access the object . any help i'll apriciate that .
in the code i know for shure that i did get the data to my string sqlCity.but when the code come to adap.Fill(dt); it just jump to the catch.i try to do debugging but i did not find the reason why it not fill my dt datatable.can someone tell my what is the problem ?
I Define a user control that Inherits From Control Class I want to show many instances of that class in a new class than inherits from Pannel Class When I make instances and run this Code, there is no control in my Pannel:
Try using something like log4net or NLog both of which are free and easy to use, rather than rolling your own. I use log4net in a console application and it writes clear and concise log files with pipe-delimited fields; so easy to parse and view, if required. Very quikc and easy to set up and integrate into your code.
No real way to know what is wrong with your code if you don't provide samples/exceptions.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. nils illegitimus carborundum
yup - while I have some issues with log4net (I use a custom startup so I can dynamically define where the log file goes based on where the app exe is located, rather than a fixed path/location for log files), I'd recommend it to anyone starting out using/needing logging
I have tried the Nlog tool. It worked well with one project, and when I tried to add it to another project, it was a complete mess. I was not able to add the config file specific to this second project.
I read that you need to install the tool, not having any pojects opened, just only the VS opened. I did that as well, but it was not straight forward.