Basically I'm converting local dates stored in the database into UTC. But I've read somewhere that daylight saving rules have changed in 2007. So does the Date.ToUniversalTime() function still work correctly. Basically the dates before 2007(when the new rules came into effect) would be converted correctly but the dates after that would b...
I'm writing an Excel Addin using COM Interop from .net. I have a command that pops up a dialog, and from the dialog I do some work like collecting data from the used range of several sheets. The problem is that if a cell is in edit mode, some of the calls that I need to make will throw exceptions. I would like a way of determining before...
A web app our group has put together uses the ASP.NET Wizard control. Each step in the wizard contains a corresponding custom UserControl.
The trouble is that as you go through the wizard steps, all the UserControls are loaded on each step, rather than just the one used in that step. That doesn't seem right to me.
So...is there anybo...
When adding a reference to a project I sometimes see the message...
"The Target Framework version for the project is higher than the current project Target Framework version. Would you like to add this reference to your project anyway?"
I understand what the message is indicating but can anyone explain what issues might arise from sayi...
hi there,
the WPF Popup control is nice, but somewhat limited in my opinion. is there a way to "drag" a popup around when it is opened (like with the DragMove() method of windows)?
can this be done without big problems or do i have to write a substitute for the popup class myself?
thanks
...
How can I create 7-Zip archives from my C# console application? I need to be able to extract the archives using the regular, widely available 7-Zip program.
Here are my results with the examples provided as answers to this question
"Shelling out" to 7z.exe - this is the simplest and most effective approach, and I can confirm that it...
I'm working on my 1st project using MS Unity IoC framework.
If I have this in my unity configuration:
<container name="TestBusiness">
<types>
<type type="PFServer.DataAccess.TestDataAccess" />
Then I get the error:
Could not load type
'PFServer.DataAccess.TestDataAccess'
from assembly
'Microsoft.Practices.Unity....
Getting the following error when I try to execute a SOAP request using .net:
failed: System.InvalidOperationException : There is an error in XML document (1, 776).
----> System.InvalidOperationException : The specified type was not recognized: name='ArrayOf_xsd_anyType', namespace='http://soap.ddr.opentext.com', at <multiRef xmlns=''>...
What interop signature would you use for the following COM method? I am interested particularly in the final two parameters, and whether to try to use MarshalAs with a SizeParamIndex or not.
HRESULT GetOutputSetting(
DWORD dwOutputNum,
LPCWSTR pszName,
WMT_ATTR_DATATYPE* pType,
BYTE* pValue,
WORD* pcbLength
);
Doc...
Hi,
I'm preparing a class on Visual Basic 2005 targeting Visual Basic 6 programmers migrating to the .NET platform.
I would like a word of advice about whether to recommend them to always enable Option Strict or not.
I've worked exclusively with C-style programming languages, mostly Java and C#, so for me explicit casting is something I...
I have to copy quite a lot of files from one folder to another. Currently I am doing it in this way:
string[] files = Directory.GetFiles(rootFolder, "*.xml");
foreach (string file in files)
{
string otherFile = Path.Combine(otherFolder, Path.GetFileName(file));
File.Copy(file, otherFile);
}
Is that the most efficient way? Seem...
Hi,
I have a few questions related:
1) Is possible to make my program change filetype association but only when is running? Do you see anything wrong with this behavior?
2) The other option that I'm seeing is to let users decide to open with my application or restore default association ... something like: "capture all .lala files" or...
How does the HttpBrowserCapabilities.Crawler property (http://msdn.microsoft.com/en-us/library/aa332775(VS.71).aspx) work? I need to detect a partner's custom crawler and this property is returning false.
Where/How can I add his user agent so that this property will return true? Any other way outside of creating my own user agent de...
If you create a class library that uses things from other assemblies, is it possible to embed those other assemblies inside the class library as some kind of resource?
I.e. instead of having MyAssembly.dll, SomeAssembly1.dll and SomeAssembly2.dll sitting on the file system, those other two files get bundled in to MyAssembly.dll and are ...
VB.net web system with a SQL Server 2005 backend. I've got a stored procedure that returns a varchar, and we're finally getting values that won't fit in a varchar(8000).
I've changed the return parameter to a varchar(max), but how do I tell the OleDbParameter.Size Property to accept any amount of text?
As a concrete example, the VB co...
I'm about to get started converting a C# based desktop app to be web based. For a couple of reasons, I would like to cut the GUI from the logic via a web service. Microsoft has asmx files, WCF, and probably something new at PDC next week. Data can be passed via SOAP, REST, JSON, and probably 12 other ways as well.
Could anyone sugges...
I'm lead to believe that I cannot count on the order of items added to a dictionary for enumeration purposes.
Is there a class (generic if possible) to which items may be added with a key and which can be enumerated in addition order or which can be retrieved by key?
Clarification: I do not want to enumerate in Key Order. I want to enu...
In a WinForms UserControl, I would pass data to the main GUI thread by calling this.BeginInvoke() from any of the control's methods. What's the equivalent in a Silverlight UserControl?
In other words, how can I take data provided by an arbitrary worker thread and ensure that it gets processed on the main displatch thread?
...
I am interested in writing a simplistic navigation application as a pet project. After searching around for free map-data I have settled on the US Census Bureau TIGER 2007 Line/Shapefile map data. The data is split up into zip files for individual counties and I've downloaded a single counties map-data for my area.
What would be the b...
I wanted to compare the datetime which is in this format "7/20/2008" with the ones in the database which is in format "7/20/2008 7:14:53 AM".
I tried using "like" clause but it did not work beacuse the "like" clause uses only string and the one which I am using is date time format.
Can anyone tell how to convert and compare it in datab...