Say I have a object Client that has a child StatusType object. Both implement INotifyPropertyChanged.
The Client subscribes to the prop changed event in the property after checking for null and making sure value is different
public StatusType Status
{
get { return _status ?? (_status = this.GetNewStatusType()); }
set
{
...
I want to write a code that transfers data from on server to my SQL Server. Before I put the data in, I want to delete the current data. Then put the data from one to the other. How do I do that. This is snippets from the code I have so far.
string SQL = ConfigurationManager.ConnectionStrings["SQLServer"].ToString();
string OLD = Co...
Is it useful to write a standardised TDD [Test] method that would expose common memory issues ?
The set of tests could be easily, quickly applied to a method and would red-fail 'classic' .NET memory issues but would green-pass the classic solutions.
For example common memory issues could be : too much relocation by the garbage collec...
Big Subjective Question: I often find myself using LINQ to filter a set of objects and then, after the query, doing an old fashion foreach to perform an action on each of the results. Is there a good way of combining these two tasks such that an action is performed on each object that matches the Where() predicate? Almost like passing an...
After converting an ASP.NET webform (v3.5) to use a master page, I started getting a strange Javascript error.
The content page has a block of javascript. Here it is:
<script type="text/javascript">
var attCount = 0;
function CreateAttachmentControl() {
var newAtt = document.createElement('span');
var newAttN...
I am looking for an integration framework for building and managing SOA composite applications consist of exposing web services, calling 3rd party web services, performing business logic and invoking database.
It is similar to Sun Java Composite Application Platform Suite (Java CAPS).
...
My boss has asked me to disable constraints for the dataset layer of our application. Seemed easy enough to me, since the .XSDs had the EnforceConstraints boolean. However, after turning that off I'm still getting the "Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints."...
Using WPF I've succeeded at implementing drag and drop to rearrange items within a list(view or box) and also to drag and drop items between lists.
Now I am trying figure out how to implement drag and drop with NESTED lists.
For instance I have a listview containing projects and each project item contains another listview of tasks. I ...
Quick question here: is there any obvious benefit to use asynchronous communication with the NetworkStream class (generated by TcpClient), i.e. the BeginRead/BeginWrite methods rather than running a separate thread and using synchronous operations on that, i.e. Read/Write? My impression has been (it could easily be quite wrong) that the ...
Are there any libraries which exist for accessing audio (mp3 wmw) metadata using the .net compact framework?
...
I'm looking to build a .Net application that has a UI similar to that of Visual Studio. Is there a name for that paradigm? Or does anyone know of a tutorial to do so...or even an OSS project that utilizes that paradigm? I'm looking for like the docking aspects and the interaction between panels...
99% of my experience is in the web s...
I have used up my 30 day trial and want to buy Resharper now. But, I'm poor and $150 is a lot for me to handle right now.
Is anything in VS 2010 going to make buying Resharper now a mistake? I heard that VS 2010 is like VS 2008 + Resharper.
I find it hard to believe but wanted to ask SO before spending my money.
Thanks!
Result: ...
Is there any way to automatically handle cookies in .NET with the HttpWebRequest/HttpWebResponse objects? I'm preferably looking for an equivalent to LWP::UserAgent and its behaviour (perl), only in a .NET environment.
Any suggestions or advise?
Thanks in advanced.
...
I've seen several classes in the framework with this behavior (a refresh symbol in the watch window, and a warning). Is this controlled by an Attribute? If so, how can I emulate this in my library?
EDIT: Thanks for the info! To clarify, I am developing a framework with properties that must access data from a single thread. Unfortunately...
Hello,
I'm trying to build a custom control in ASP.NET MVC. The thing that I want to avoid is mixing the view (html) and the code (C#) in these controls.
After hours of googling and struggling with this problem I've finally thought of creating helper methods that use the ASP view Engine thought the ViewPage class.
I'm able to create a...
I'm having difficulty getting crystal report to load data from a MySQL DB. I am using the Connector/NET and have a DataSet in the project which can access the data just fine. I am able to set the report data source to a DataTable from the DataSet. Crystal reports seems to know all about the column information, as I can create fields etc....
I am about to buy Programming WPF, but am undecided after reading this. Can anyone who has read this book tell me if it has insufficient XAML coverage.
In fact one of the reviewers at Amazon mentioned that the following topics are not covered.
dynamic data binding
how to create an app start to finish using expression and all of the ...
I'm going to be writing a Windows application using the .NET framework and C#. The application will need to store relational data which will be quieried, joined and processed.
Previously I've done this using SQL Server, but that is a total overkill for the application I am now making.
What's the simplest, easiest way to store relationa...
How do I get my OwnerDrawn UserControl to respect the users dpi (96/120/xxx) and/or font-size (normal, large, extra large)?
Some people suggest to use the DpiX and DpiY properties on a Graphics object, but that doesn't seem to to anything in my control (i.e. they are always set to 96, regardless of which font-size or dpi I choose).
The...
This question applies to Windows Vista!
I have an application which normally works without administrative privileges. There is one activity which does need administrative privilege but I don't want to start the application itself with higher privileges when I know most of time user wont even be using that feature.
I am thinking about c...