Consider the following function that implements non-blocking access to only the one thread.
public bool TryCancelGroup()
{
if (Monitor.TryEnter(_locked))
{
if (_locked == false)
{
_locked = true;
try
{
// do something
}
catch (Exception ...
Hi,
Default settings makes each line where the break point is to be highlighted. Is there an option to make this line not to be highlighted (the point in the left side of the window is enough for me)
Thanks for help
...
I have a fairly complex application which has been broken up into multiple components. Each component has a solution file which contains a bunch of projects. So I like to think of this as a component has multiple projects/dlls in it. There is also a "common" component. All the other components depend on "common". So a compile goes like t...
I use an ObservableCollection<customclass> with an isSelected property bound to a listview. The customclass items are added via asyncrhonous communication with a server. I register to an NotifyCollectionChanged event and there under certain conditions set the isSelected property to true. However, this doesn't update my view. Only after s...
i have a tinymce textbox which i want to disable and again enable on a button click through asp.net
when it is disable it should be read only.
...
I have an app that was created using .net Framework 3.5. However, I now need to change this to use the 2.0 Framework, as it needs to be distributed to a Windows 2000 machine. Will simply changing the Application Target Framework on the project properties be sufficient to do this?
...
Hi,
Can we inherit singleton class?
...
How the StringBuilder class is implemented? Does it internally create new string objects each time we append?
...
Please, advise me any .net gui controls library for create user interface like in Yahoo messenger or like Trillian. May be this will be easy skin-based interface library or other. I need only simple controls ex. buttons, listview combobox, checkbox and other therefore library must be small. I know DevExpress and Infragistics libraries bu...
Whats the difference between DataAnnotations and Application Validation Block?
...
Hi,
I'm developing a .net 3.5 Win Forms program and I've run into an "interesting" problem with text drawing.
I'm implementing a text editing control and it draws text with DrawString() and StringFormat.GenericTypographic (henceforth, GT). As the user types, whole words (or groups of words) earlier in the line are moving subtly left an...
My code is written with C# and the data layer is using LINQ to SQL that fill/load detached object classes.
I have recently changed the code to work with multi threads and i'm pretty sure my DAL isn't thread safe.
Can you tell me if PopCall() and Count() are thread safe and if not how do i fix them?
public class DAL
{
//read one Ca...
What are the differences between System.Dynamic.ExpandoObject, System.Dynamic.DynamicObject and dynamic?
In which situations do you use these types?
...
I need to create a type at runtime using the TypeBuilder. This type should implement a specific interface so that it is possible to treat instances of this dynamic type uniformly at the compile time.
The interface should return an array of objects filled with values of specific fields in that type.
Interface that is supposed to be imp...
I've got a C# 2.0 project which is set to target 'Any Cpu', however it is referencing a C++ project that's building a 32 bit dll.
When I try to run my program on a 64bit machine I get the following error:
System.BadImageFormatException was
unhandled Message: Could not load file
or assembly TreeTMHook,
Version=1.0.2889.19619,
...
I have VS Web Express 2010 installed. I have just installed Mysql .Net connector. I have taken version 6.3.3 as it was advised in [this thread][1]. However I have no option to add a connection to Mysql in VS 2010 Express database explorer. Have anybody such a problem?
[1]: · http://stackoverflow.com/questions/901049/how-do-i-connec...
I'm using a self-hosted WCF service with duplex tcp binding without any kind of security. I'd like to transport a username and password from the client so the server code can check for validity. How do I do that? The main goal is to keep it simple.
My idea was to set the binding.ClientCredentials property when establishing the connectio...
When working with third party systems, especially very configurable systems that dynamically load providers, controllers, components and so on, I sometimes just want to know when a certain object or class is accessed. Normally, I'd place a breakpoint on any potential lines in my source (a nuisance, but it works), but if source is not ava...
Hi,
Can you briefly list the differences between <%= %>, <%# %> and <%$ %> by giving a simple example maybe that requires only one of those expressions to be used?
Thanks
...
I have the below string
P,MV,A1ZWR,MAV#(X,,), PV,MOV#(X,12,33),LO
I need the output as
P
MV
A1ZWR
MAV#(X,,)
PV
MOV#(X,12,33)
LO
As can be make out that it can be easily done by splitting by "," but the problem comes
when it is MAV#(X,,) or MOV#(X,12,33) type.
Please help
...