|
|
Thnaks for your response,
but can u give me some code example that uses the OleDB/Jet provider.
thanks,
|
|
|
|
|
how to populate ComboBox using c# as in lookin combobox of open dialog box in windows OS?
i tried, but invain.
thanks in advance
tirumal
|
|
|
|
|
|
Hi there,
I wanna use dockpanel class, MSDN2 example shows to use 'using system.windows' and 'system.windows.controls. The need is when i add these to using directives, there is no such thing exists in C# 2005. Can u please tell me, how can i add these two things or where from i can get these.And also if possible some examples using dockpanel.
|
|
|
|
|
You need .NET Framework 3.0 (I assume you have 2.0)
SkyWalker
|
|
|
|
|
Thanks a lot. I will get back to you, if i need further clarifications.
|
|
|
|
|
How can I install, .net framework 3.0? I installed it from MSDN specified location. But still i am not getting it in VS2005?
|
|
|
|
|
The DockPanel is part of WPF ( Windows Presentation Foundation ) which is part of .Net 3. To install .Net 3 goto http://www.netfx3.com/.
Once you have installed .Net 3 you can get to the DockPanel by referencing "PresentationFramework.dll" then your using statements will work.
|
|
|
|
|
If you say you did, then probably you have to add a reference to PresentationFramework (presentationframework.dll).
SkyWalker
|
|
|
|
|
|
Hi,
how can i detect that my application is running somewhere in LAN?
Want make access to let say 5 running instances in LAN, not more.
Any idea?
Greetings
|
|
|
|
|
Have a central repository where the application logs in/out when starting/terminating.
E.g. by having a central database or using a web service.
|
|
|
|
|
Thar sounds dangerous: what if a logout gets missed (e.g. client app crashed).
After some of these, the server will report the maximum allowed number of users
has been reached though no one is actually using the app ?? SO there is need for
a way to get out of there, and once that solution is known, the whole thing becomes
pointless.
I prefer a broadcast + timeout solution where a starting app tries to get a response
from it's sibblings on all other machines; only the machines running the app would
repond and it there are too many of those, the most recent client would refuse to continue.
AFAIR FileMaker has used such a scheme, and it did not need anything special set up
on any Firewall or so (I guess they used TCP/IP with one of the ports that are open
by default...).
I havent seen any source code on this though...
Luc Pattyn
|
|
|
|
|
How to implement single sign on in c#?
please help
Thanks & Regards,
Venkat
|
|
|
|
|
You'll need to give a bit more detail as to your intended usage, environment, etc. before that question can be adequately addressed.
However, a simple search of Google yields 816,000 hits. Maybe you could read a little first.
only two letters away from being an asset
|
|
|
|
|
I need to implement single sign on for an intranet application using c#
Thanks & Regards,
Venkat
|
|
|
|
|
I'm curious as to the which method one would choose, and why. My preference for this would be Method B, it seems cleaner, easier to read and runs faster (though moderatly depending on the code inside the block). I also try to avoid conditions like while(true) in multi-threaded situations.
Method A
<br />
int x = 0;<br />
do<br />
{<br />
if( x < some_number )<br />
break;<br />
<br />
...do some work...<br />
<br />
x++;<br />
}while(true);
Method B
<br />
int x = 0;<br />
do<br />
{<br />
...do some work...<br />
}while(x++ < some_number);
only two letters away from being an asset
|
|
|
|
|
Mark Nischalke wrote: I also try to avoid conditions like while(true) in multi-threaded situations.
Interesting. A multi-threaded situation is usually the only time when I'll use a while(true) . Typcially it's in a thread procedure that can in theory run forever and is only broken out of when the containing object is disposed.
while(x++ < some_number);
Personally, I don't like this. I try to avoid statements that have side effects. I think I'm not seeing your point, though. The example can easily be rewritten as:
int x = 0;
while(x < some_number)
{
x++;
}
Is there a reason you want to use the do/while loop construct? It can come in handy when you need to run the loop at least once, but for this example, I'm not seeing it.
|
|
|
|
|
Leslie Sanford wrote: it's in a thread procedure that can in theory run forever and is only broken out of when the containing object is disposed.
Certainly. This example though was used in a situation where the method containing it could be accessed by multiple threads but should not be locked in an infinate loop or race condition.
Leslie Sanford wrote: Is there a reason you want to use the do/while loop construct? It can come in handy when you need to run the loop at least once
Nothing significant in the meaning of the code snippet, just the example I was working with needed at least one execution.
only two letters away from being an asset
|
|
|
|
|
I'd always use a for loop, if I am iterating from a known value, to a known value.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
That's true, forgot that. I meant to imply that some_number was a variable, possibly set in the loop.
Just looking for opinions and ideas to improve my skills.
only two letters away from being an asset
|
|
|
|
|
So, perhaps say some_test instead:
Method A
<br />
do<br />
{<br />
if( some_test )<br />
break;<br />
<br />
...do some work...<br />
<br />
}while(true);<br />
Method B
<br />
do<br />
{<br />
...do some work...<br />
}while( ! some_test ) ;<br />
As long as there's only one test I'd choose B .
A may be better if there are several tests, but I'd make it a while , rather than a do/while .
|
|
|
|
|
Aside from the fact that your two examples are using conditions that are the opposite of each other , I agree with Christian that a regular for loop would be the obvious choise:
for (int x = 0; x < some_number; x++) {
...dostuff
}
---
Year happy = new Year(2007);
|
|
|
|
|
Hi,
I wanna know how we can read an Excel file and then write it into a table in Access Database.
After that, we export our data into an Excel file.
Please help me, thanks so much
|
|
|
|