.net

Why is dotnet's char.IsLower() a static method?

This seems to go against every design guideline. A static method that accepts a single argument of type T should usually just be a member method. It's so bizzare I actually had to post a StackOverflow question to understand IsUpper exists (as it didn't show up in auto-completion) Edit I understand my earlier statement needs a little e...

Can't debug - "The breakpoint will not currently be hit. No symbols have been loaded for this document"

Hi- I'm getting the error in the subject line. I'm running vs2k8 on server 2k3sp2. I've tried deleting the pdbs, cache directories, verifying that debugging is set up on the specific page. The interesting thing is other pages debug just fine. Just when I go to this one page. Must be a configuration issue but the page directive looks like...

Update more than one database using same ObjectDataSource using C#

Is there a way to update more than one Database having same schema using single ObjectDataSource in C#??? i.e Just by providing more than one connection string is it some how possible to update more than one Database? I need to update/insert same record in multiple Database with same schema using ObjectDataSource in C#. ...

ConfigurationManager.AppSettings Caching doubt

We know that IIS caches ConfigurationManager.AppSettings so it reads the disk only once until the web.config is changed. This is done for performance purposes. Someone at: http://forums.asp.net/p/1080926/1598469.aspx#1598469 stated that .NET Framework doesn't do the same for app.config, but it reads from the disk for every request. Bu...

references in visual basic .net

Hi, Somewhat unclear to me are references (pointers?) to classes in Visual Basic .Net. The question I am about to ask can be answered by a little bit of testing, but I was wondering if anybody could post a decent explanation (or links, too). If you create a class: Public Class ReferenceClass private myBooleanValue as Boolean = F...

Impersonation when running a remote triggered job

My (.NET) app allows users to tweak database values. They will then need to generate reports based on their edits, either Crystal or Reporting Services, but that's not important - what is important is that the generation won't definitely be able occur on their local box, e.g. they might not have Crystal Reports (or whatever) installed on...

operator overload problem

I am trying to write operator overload for custom class and don't know how to handle null comparison. Class Customer { int id; public static bool operator ==(Customer a, Customer b) { //When both a and b are null don't know how to compare as can't use == in here as //it will fall into loop } } Problem ...

I'm new to .NET - what should I concentrate on and what should I ignore?

So, I've had a fair amount of experience programming database driven web apps using php and coldfusion (not together, at different times) and I'm starting to look into the asp.net world (I have a project coming up at work that is all asp.net/c#.) My question is: there seems to be a lot of stuff to get mired in and if I'm just making web...

Catch block not catching exception

...

How do I convert a string array to a LPCWSTR in .NET to pass to a Win32 API function?

Hi all I have a piece of C# code that needs to convert a string array to a LPCWSTR to pass to a Win32 API function. I can't find nothing in the Marshal class that makes it straightforward. Does anybody knows how to do that? ...

Freely downloadable e-books for .NET?

Trying to amass a collection of freely downloadable e-books/pdf books for .NET. If you've any good resources, please list them here. ...

dotNET OleDbParameter's name obsession

Since OleDbParameter thing does not use named parameters, (due to its nature) why is the .NEt OleDbParameter classes obsession with (string parametername ... All constructors require a parameter name, and I think what name to give it .. my name is ok? or my grandmothers name? ...

Do I need to enable a Service Broker endpoint on SQL 2005 to use SQLCacheDependency?

Hi All, My question really has three related parts which I hope you can help me clear up - Do I need to enable a Service Broker endpoint on SQL 2005 to use the SQLCacheDependency mechanism? If so, is there a specific port that needs to be used? If neither of the web server machine and sql server are in a domain, what type of authentic...

How to retrieve sender in click handler from toolbartray or other control in wpf?

XAML: <ToolBarTray Name="tlbTray" ButtonBase.Click="tlbTray_Click"> <ToolBar Name="tlbFile"> <Button Name="btnOpen"><Image Source="images\folder.png" Stretch="None" /></Button> <Button Name="btnSave"><Image Source="images\disk.png" Stretch="None" /></Button> </ToolBar> </ToolBarTray> Code: private void tlbTray_Click(object ...

Is there a SortedList<T> class in .net ? (not SortedList<Key,Value> which is actually a kind of SortedDictionnary)

I need to sort some objects according to their contents (in fact according to one of their properties, which is NOT the key and may be duplicated between different objects) .net provides two classes (SortedDictionnary and SortedList), and both are some kind of Dictionaries. The only difference (AFAIK) is that SortedDictionnary uses a bi...

extracting mantissa and exponent from double in c#

Is there any straightforward way to get the mantissa and exponent from a double in c# (or .NET in general)? I found this example using google, but I'm not sure how robust it would be. Could the binary representation for a double change in some future version of the framework, etc? The other alternative I found was to use System.Decima...

OpenOffice and .NET

Is there a .NET API for OpenOffice? EDIT: Is there a OpenOffice SDK for .NET? ...

MVC pattern in .NET: Can View call Exceptions in Model?

I'm using the MVC pattern in a .NET winform app. There are places in the Controller that can cause an exception. Rather than catching the exception and dislpaying a messagebox, which is a View responsibility, I do nothing in the Controller and let the View wrap that area in a try/catch. So far, there isn't anything that needs to be do...

Logging Commons and Mapped Diagnostic Context

What have others done to get around the fact that the Commons Logging project (for both .NET and Java) do not support Mapped or Nested Diagnostic Contexts as far as I know? ...

Populating nested collections from database

I have the following 3 classes Book Product SpecialOptions There are many Books, and there are many Products per Book. Likewise in a Product there are many SpecialOptions. There are other properties of each of these three classes so each class has the following interface Public Interface IBook Private ProductList() as collection ...