Having programmed for a while now I have noticed that I am becoming more and more reliant on the internet and intellisense to do my job. But I was wondering how much that has effected my knowledge over the past year or so. But does this matter?
For example I am more likely now to remember that when I need to program against objects I ha...
Hi All,
I have got this error when using Enterprise Library 3.1 May 2007 version. We are developing a product and have a common lib directory beneath the Subversion Trunk directory
<>\Trunk\Lib\ into which we put all the third party DLLs. Inside this we have Microsoft\EnterpriseLibrary\v3.1 in which we have copied all the dlls from ...
I am using an open source client to programmatically process incoming emails (on Windows 2003). The only way to prevent receiving previously read emails is to delete them from the server. This is less than ideal. As far as I know, there is no command in Pop3 to set emails as being read. So how do you go about this?
...
Guys
Could you share with me a link to the whole list of “Microsoft .Net Development Series” books?
Thank you.
...
Hi,
I am working on creating an immutable class.
I have marked all the properties as read-only.
I have a list of items in the class.
Although if the property is read-only the list can be modified.
Exposing the IEnumerable of the list makes it immutable.
I wanted to know what is the basic rules one has to follow to make a class imm...
I was curiious to know what type of structures you use for your project references?
Where I work the developers have a shared folder called AssemblyCache (\\MACHINENAME\AssemblyCache) which is mapped to an R:\ via GPO in Windows 2008 AD (tied to the Developers AD group).
Our shared components have post-build events that copy them to so...
According to this article rebasing is not necessary for .NET assemblies due to JIT compilation of the code. The article states:
"JIT-compiled code does not have a rebasing problem since the addresses are generated at run time based on where the code is placed in memory. Also, MSIL is rarely affected by base address misses since MSIL re...
I'd like to create an XPS document for storing and printing.
What is the easiest way to create an XPS document (for example with a simple grid with some data inside) in my program, and to pass it around?
...
I'm making a WPF application that is comprised of Screens (Presenter + View). I want to be able to declare these screens in a config file or SQL database. I have been trying to come up with a good solution I've given up and am asking how some of you design this sort of thing? I've been working at this for over a week and every solution I...
I have a Word VSTO Document with a code-behind dll named WordDocument1.dll
Project folder D:\Work\Seven\WordAutomation\ContentControls\WordDocument1\bin\Debug
I've copied some custom code into an MyAppExecs folder under that. The DLL has a private bin path specified so that code in MyAppExecs is reachable.
So on startup, I load a Star...
Is Structured Exception Handling bad? What is the right way to handle exceptions?
EDIT: Exception Handling in .NET using C#.
I usually have a set of specific exception classes (DivideByZeroException, ArrayTypeMismatchException) and don't have a generic "catch (Exception ex)".
The thinking behind this is that I expect certain types of ...
I'm trying to abstract out all database code into a separate library and then use that library in all my code. All database connections are done using typed TableAdapters that I create by dragging and dropping in datasets in VS2005, using a connection string from the appSettings.
The problem that I haven't been able to solve is that .Ne...
I have a query that runs super fast when executed in the sql editor (oracle): 1ms.
The same query (as stored procedure) when executed by a DataSet-TableAdapter takes 2 seconds. I'm just retrieving 20rows.
Since I'm using a TableAdapter, the return values are stored in a ref cursor.
If I was fetching 2'000 rows I could understand that ...
I have a GridView Control that for other functionality has to be inside an update panel. The site is using the Ajax Control Toolkit and the "EnableSortingAndPagingCallbacks" property on the Grid is set to false. However, when I execute a paging call it is still doing it as a callback instead of a postback. How do I fix this and get the p...
I'm running into a problem when modifying a WCF service.
The original service method looks like this:
[OperationContract(IsOneWay = true, IsInitiating = true, IsTerminating = false)]
void Login(string userName, string password);
This method works.
The problem is that when I change it to this:
[OperationContract(IsOneWay = false, Is...
I am unable to select Microsoft.Office.Interop.Excel from my window/assembly directory. I can see that one is there but it does not give me the option to reference it. How can i select it?
...
I have an entity class that has a property with an underlying db column of datatype Int, however in reality I want this property to be an Enum. Is there any way to specify that this property returns an Enum?
...
I have some critical logic in a finally block (with an empty try block), because I want to guarantee that the code gets executed even if the thread is aborted. However, I'd also like to detect the ThreadAbortException. I've found that wrapping my critical try/finally block in a try/catch does not catch the ThreadAbortException. Is there ...
We have lots of logging calls in our app. Our logger takes a System.Type parameter so it can show which component created the call. Sometimes, when we can be bothered, we do something like:
class Foo
{
private static readonly Type myType = typeof(Foo);
void SomeMethod()
{
Logger.Log(myType, "SomeMethod started...");
}
}...
Hello, I am trying to use onkeypress on an input type="text" control to fire off some javascript if the enter button is pressed. It works on most pages, but I also have some pages with custom .NET controls.
The problem is that the .NET submit fires before the onkeypress. Does anybody have an insight on how to make onkeypress fire firs...