I'm just looking at the constructors for StreamReader / Writer and I note it uses UTF8 as default. Anyone know why this is? I would have presumed it would have been a safer bet to default to Unicode.
...
We have some unit tests running against a SQL server 2000 database using the DatabaseTestFixture (http://softwaredevscott.spaces.live.com/blog/cns!1A9E939F7373F3B7!155.entry ) class which uses a TransactionScope that is not commited and therefore all changes are rolled back. The tests ran against a local database with no problem.
...
I have a TextBox that is bound to a Text-property on an Entity-object.
I'd like to be able to re-format the text the user enters in some circumstances - e.g. if the user enters "2/4" (a fraction) - I'd like to change that to "1/2".
Via the “set-part” of the Text-property, I can change the value on the Entity-object, but that doesn't app...
Hi,
I made small program to divide large pictures and take part of them.
When i import image that made by "Microsoft Paint" this image is "96 dpi" so my program doing well.
But I've pictures that made by Photoshop its resolution is 71.6 dpi when i crop these pictures the new cropped picture take 96 dpi resolution so the size is deferen...
i want to access each object of my dictionary Dictionary with int index.
hw to do that.
...
I have a Windows Form application built on a data model and a Windows Mobile application which contains a similar data model. When users enter information in the mobile application I sync it with the data in the main application. This is achieved by essentially having the class defintions used in the mobile application in the main appl...
I am attempting to use the HtmlAgilityPack library to parse some links in a page, but I am not seeing the results I would expect from the methods. In the following I have a HtmlNodeCollection of links. For each link I want to check if there is an image node and then parse its attribures but the SelectNodes and SelectSingleNode methods o...
Is there a way to set a dependency of one "myWindowsService" to another service running on the same machine such as "SqlService"?
The prob is if you dont know the name of the "sql service" where "myWindowsService" will be installed, but my service depends on that the sql is already running..
thanx
...
In a DataGrid, when text in a textbox changes I want to add the value of another field in that row to an array.
public void txtTitle_TextChanged(object sender, EventArgs e)
{
TextBox titleBox = (TextBox)sender;
DataGridItem myItem = (DataGridItem)titleBox.Parent.Parent;
string test = DataBinder.Eval(myItem.DataItem, "prod_id...
Hi,
Firstly apologies if this is a duplicate question, I have spent a while searching and can't find anything that looks to be the same.
I need to automate the completion of a multi page web form and then process the result from within an asp.net system. The ideal solution would be to create a web service which takes in some data, the...
Hi
i want to compile a c++ program using .NET2.0 compiler.
so i navigate to c:\windows\Microsoft.Netframework\2.0.57\ and uses csc compiler to compile.
It shows lot of errors.
But it compiles csharp file. But in visual studio it compiles. so i think that in visual studio c++ copiler installed i think so.
filename test.cpp
using name...
I was reading Microsoft's Best Practices: Data Contract Versioning, and they state:
Do not remove data members in later versions, even if the IsRequired property was left at its default property of false in prior versions.
Can anyone suggest any reason for this? They don't elaborate. Since they say it's fine to add data members in ...
Hi all,
I have ComboBox item style as follows (simplified):
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="35"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" />
<Path Grid.Column="1" Style={StaticResource StarStyle}/>
</Grid>
The result is as expected. An...
Hi,
Has anyone used the WMI ChangeZoneType DNS command in C#\VB.net before. I get an incorrect parameter exception when i try and invoke the changezonetype command. I get the dns zone that i want to change from the dns server (via query), set the zonetype to the appropriate uint value but am then getting the exception. I am trying to ch...
Hi,
I have several special methods, and I want analyze they calls in compiled assembly.
Example:
public static class SrcHelper {
[MySpecialMethod]
[Conditional( "DEBUG" )]
public static void ToDo( params object[] info ) {
/* do nothing */
/* this method is not called when code is compiled in RELEASE mode */...
HI
i write a code like
filename test.cpp
#include<stdio.h>
void main()
{
printf("Hello");
}
}
I have .Net Framework 2.0 installed in my computer. Compiling using MSBuild.exe
when i try to compile this from command line and navigated to .NET frameworl 2.0 folder using msbuild.exe it shows warning and error that VCBuild.exe not ...
I am working in C# and VS2008.
I have a WPF application containing a FlowDocument, which contains a paragraph, which contains a number of fairly short lines (i.e. Spans and LineBreaks). However the length of lines varies. I would like the FlowDocument's width to be large enough to accommodate the longest of these lines without wrapping,...
I'm maintaining a .Net 2.0 application using Visual Studio 2008. When the application was built, it was originally in Visual Studio 2003 and made use of the System.ComponentModel.Component class for data access. You can drag and drop commands, connections, etc onto the designer surface of the component.
In 2008, the data access classes ...
Is there a better (more performant or nicer code ;) way to find all derived Types of a Type?
Currently im using something like:
get all types in used Assemblies
check my type with all those types if it is 'IsAssignable'
I was wondering if theres a better way todo this?
...
I have the following XML
<?xml version="1.0"?>
<FileHeader
xmlns="urn:schemas-ncr-com:ECPIX:CXF:FileStructure:020001"
VersionNumber="020001"
TestFileIndicator="P"
CreationDate="13012009"
CreationTime="172852"
FileID="0000000001"
>
<Item
ItemSeqNo="09011340010009"
PayorBankRoutNo="00704524"
Amount="3980...