Basically, I have a function that has an optional dictionary argument. Since it's optional, it needs a default value, and I'd like to set it to an empty dictionary instead of Nothing. How do I go about that?
In Java, I would simply do this:
Collections.<K,V>emptyMap()
How do I do the equivalent in VB.NET?
(I'm using .NET 3.5).
...
When we should override the GetHashCode() method provided by 'Object' class in 'System' namespace.
...
Yesterday a colleague asked me how to display data in a grid where the built in data binding doesn't support what he wants to do for some of the columns.
Pleased to be able to help I explained all about the OnRowDataBound event and how you can hook into it and dynamically manipulate the cells in the row object to do pretty much what you...
I have a problem with consuming a third-party web service in .NET C#. It runs on Apache (NuSoap). Everything works normally up to deserialization (probably...). When I call the SoapHttpClientProtocol.Invoke() function, I always get an object array with one null object. Bad is that this web service doesn't provide a WSDL document. :-(
C...
I am spawning new processes in my C# application with System.Diagnostics.Process like this:
void SpawnNewProcess
{
string fileName = GetFileName();
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = fileName;
proc.Start();
proc.Exited += new EventHandler(ProcessExited);
...
I need to send email notifications to users and I need to allow the admin to provide a template for the message body (and possibly headers, too).
I'd like something like string.Format that allows me to give named replacement strings, so the template can look like this:
Dear {User},
Your job finished at {FinishTime} and your file is av...
I'm using the Microsoft Chart Controls, and displays data with dates along the X axis and want to have a grid line with a different color on some dates.
Let's say I display data for one week with 7 values along the X-axis:
05.04.09 06.04.09 07.04.09 08.04.09 09.04.09 10.04.09 11.04.09
In addition I have a collection of DateTimes and ...
how to integrate dotnet in embedded?
...
I have a discriminated union that I want to use as an argument for a function I'm exposing in a signature file. Currently I have the code defined as such:
Signature.fsi:
type Union =
| Part of string
| Part2 of int
val Func: Union -> unit
With Func being defined in a seperate fs file.
The problem is when I do this the fs file can't...
.NET 2.0 introduced VTS (Version Tolerant Serialization,
http://msdn.microsoft.com/en-us/library/ms229752(VS.80).aspx )
A simple test project reveals that the default behavior in 2.0 is to not throw a serialization exception if a field is added to a class, then an attempt is made to deserialize an instance of that class from a binary se...
How can I implement the Producer/Consumer patterns in C# using Events and Delegates? What do I need to keep an eye out for when it comes to resources when using these design patterns? Are there any edge cases I need to be aware of?
...
i have a GridView with LinqDataSource.
im using the following technique to populate a field (Supplier in this case) with dropdownlist, containing values from a different LinqDataSource:
however, lets say my Supplier field is allowed to be null. any ideas how to allow entering null value, alongside with the other SupplierDataSource opt...
Duplicate of: Debug VS Release in .net
Why there are 'Debug' and 'Release' modes on build in dot net application?
What is the major technical difference between them?
...
What is the difference between AppDomain, Assembly, Process, and a Thread
...
We use msbuild to build our .NET application on a server dedicated to builds. We are migrating to new hardware which has 64 bit Windows 2003. I can build the application using the 64 bit version of msbuild found in Framework64 or I can build it using the 32 bit verison found in Framework. Is there any advantage to building with the 64...
I'm trying to print out a DataGridView using a PrintDocument. In my PrintPage event handler, I use the e.Graphics object to draw some grid lines, then print some text in the "cells" created -- as an aside, this really should have been done by Microsoft, but I digress.
Anyway, this works just fine. The PrintDocument is tied to a PrintP...
I'm new to jQuery (I must have had my head buried in sand for the last few years!) and I'm wondering if I could use it with an Infragistics grid for updating and inserting instead of the edit row template. We're currently constrained to using the 2.0 framework, and I'm stuck with the infra grids as well.
Does anyone know if this is pos...
I'm have near to none experience with SOAP protocol. The service I need to connect to required header. I think this is somewhat standard in Java but in C# one must create this header by hand.
Does anyone here been able to connect to similar service: have created the header or maybe even know about some standard library which would sim...
I am using sandbar.dll version 1.1.0.2 for toolbar menu in wondows application.Its running fine in windows xp,and also run fine if i use classic theme in vista But if i use vista theme it gives blank pop up in vista.
Thx in advance
...
I'm curious if any developers use string.IsNullOrEmpty() more often with a negative than with a positive
e.g.
if (!string.IsNullOrEmpty())
This is how I use the method 99% of the time. What was the design decision for this?
...