Have I stumbled upon implementation-defined behavior?
Here is the context:
public class GenericClass<T>
{
public class NestedGenericClass<U>
{
public void GenericMethod<K>()
{
}
}
}
Here's the behavior. This unit test passes as written. My actual questions are listed as the comment before the "wack...
I am searching for control names using Request.Form.
Of course I know you can can iterate around all values using AllKeys, and you can do Form["controlName"] as well.
However some of my control names are dynamic and it would be useful to be able to do stuff like:
1)Getting a subset of controls in the collection whos name start with a ...
I am running a Process in a BackgroundWorker to resize images. If I set UseShellExecute = false on the process's startinfo, I get odd behaviour if I do any simultaneous image manipulation with the FreeImageNet library on the UI thread. The odd-behaviour is that when I go to close a new image via CloseMultiBitmap() the method appears to w...
Hello all,
I have the .net code written to export data to a csv file. The problem is that one of the columns has data like 5-8-13
When I double click the .csv file in excel this column shows data as 5/8/2013 i.e. it is misinterpreted as a date column which is not what I want. Is there some escape character which I can use while exporti...
Is there a way to pull out keys from a NameValueCollection that pertain to a certain pattern/naming convention without having to iterate through every value in the collection?
...
Hi
does anyone have a snippet of sample code to get country and state/city via the Google Maps API of a request from an asp.net application (in code behind)?
Any help much appretiated!
Thanks!
...
I have this problem with an app of a printer. I need to know if it is an error in my installation or a bug in the app. I think it is a bug (programmer didn't catch this exception), and I suspect this app is made in C# and they didn't noticed the uncaught exception when they upgraded their printers (The fact is that they added a character...
We need to talk to another system that wants to communicate to us via raw tcp/ip socket communication. What would be the appropriate .Net object, if any, to use for this?
If you know of a 3rd party component, open source component, etc., that you think is better to use, please feel free to mention that as well.
...
I'd like to expose Office (Excel, Word) files from a web site.
I understand Office 14 now provides Silverlight components to view/edit Office files.
What do I need to setup on my web site to use these components?
...
I am exploring the HashSet<T> type, but I don't understand where it stands in collections.
Can one use it to replace a List<T>? I imagine the performance of a HashSet<T> to be better, but I couldn't see individual access to its elements.
Is it only for enumeration?
...
I have two tables in my database:
Wiki
WikiId
...
WikiUser
WikiUserId (PK)
WikiId
UserId
IsOwner
...
These tables have a one (Wiki) to Many (WikiUser) relationship.
How would I implement the following business rule in my LINQ entity classes:
"A Wiki must have exactly one owner?"
I've tried updating ...
If I add let's say 1 line at the beggining of a method, if I set a breakpoint through Visual Studio on the first line, will it point to the first line or the second? If it will flag the wrong line, is there anything we could do when editing .exe files to ensure a regular debugging session later?
Isn't there something like setting line x...
How can I force and application and any threads that are started by that application to run under a specific culture?
I have tried the following but I still get exceptions in English.
My understanding was that the wording on exceptions are translated using the active culture.
static void Main(string[] args)
{
Thread.C...
Is there a special regex statement like \w that denotes all printable characters? I'd like to validate that a string only contains a character that can be printed--i.e. does not contain ASCII control characters like \b (bell), or null, etc. Anything on the keyboard is fine, and so are UTF chars.
If there isn't a special statement, how c...
For various reasons I have decided its time to take some .NET exams, I'm
starting with 70-536, Microsoft .NET Framework 2.0 - Application Development Foundation.
As part of the study, I'm going through some practice tests and realise there is a lot
of stuff that I've never or rarely used in 6-7 years of .NET experience (mostly building...
In VB 2005 .Net is there a function that works like the php function "htmlentities"?
...
I have object XML serialized messages coming into a class called MessageRouter. The XML contains the Type name it it was serialized from, and I need to be able to invoke different delegate methods depending on the type that are not known until runtime. I'm not extremely strong in generics so hopefully this will make sense to someone...
...
In vb2005 how do you simulate a web browser's file download using Net.HttpListener?
This current program functions somewhat like a webserver. how when a client from a web browser
asks for a file do i allow them to down load the file? currently the method will tell the browser that there is a file but it will fail after the client oks th...
Hello,
how can I get a list of all processes in C# and then for each process current memory and CPU consumption?
Sample code is highly appreciated.
Thank you!
...
Hello,
I'm trying to paint a simple bar chart via C# but I've never experimented with the Graphics and Drawing namespaces. I thought of generating a "start" and "end" graphic and then repeating an image somehow (to show a "length") but I have no idea how to do this.
I'd be really happy if you can point me in the right direction and/or ...