.net

. change to # when reading data from excell file

Hi,I use the following code to read excel data into a data table , however the column name P.O.BOX has changed to P#O#BOX in the data table.Can anyone shed some light on why this is happening? Dim FileName As String = "C:\abc.xls" Dim conn As Data.OleDb.OleDbConnection = Nothing Dim dt As New DataTable Try Try ...

replace text in a string with .net regexp

Hello, I try to use regexp in .net to find and replace strings with certain token, example myString = "this is a example of my text that I want to change <#somevalue#> and <#anothervalue#>" How I can find the text with tokens between "<#" and "#>" and for each of those, do something to replace it (search on a database and replace any o...

What C# collection should I use for this use case?

http://www.dreamincode.net/forums/user/335389-sergio-tapia/ I'm the Helper group, currently there are other groups. I want to write all possible groups to a C# class or something and then in the future when other groups are created I'd just modify that "collection of groups". My question is, what C# structure should I use for this use ...

LINQ orderby FK using a left join

Hi, I have the following code: from _categories in context.SCT_Categories join _categoryOrders in context.SCT_CategoryOrders on _categories.ID equals _categoryOrders.CategoryID into joinedData from _categoryOrders in joinedData.DefaultIfEmpty() orderby _categoryOrders.OrderIndex descending select _categories Which does a left join on...

Access control in ListView in WPF

Hi, I have a listview like this and would like to access the textbox of SELECTED ITEM in side? lsitview.blah.blah.findTheTextBox("blah").Name="good!"; How am I able to do that? Thanks <ListView Name="listview"> <ListView.View> <GridView> <GridViewColumn> <GridViewColumn.CellTemplate> <DataTemplate> ...

a windows service monitors local system time to start other services?

Hi all, need your advices on this scenario: I have a bunch of services installed on a server, they need to be set to start and stop dynamically depending on the local system time, meaning the start time and end time are different almost everyday, e.g, today these services are set to start by 9am and end by 9pm, and tomorrow could be 10...

64 Bit P/Invoke Idiosyncrasy

I am trying to properly Marshal some structs for a P/Invoke, but am finding strange behavior when testing on a 64 bit OS. I have a struct defined as: /// <summary>http://msdn.microsoft.com/en-us/library/aa366870(v=VS.85).aspx&lt;/summary&gt; [StructLayout(LayoutKind.Sequential)] private struct MIB_IPNETTABLE { [MarshalAs(UnmanagedT...

WPF datagrid custom column

Hello.. Is there a solution to bind from a dataset a collumn and convert the database DateTime value to Date value and display it? Also i would like a boolean column from the database to be displayed as True/ False and not checkbox...Any ideas? ...

How separate are C# and .NET?

I see language features like C#'s foreach loop (which requires the use of IEnumerable), and its using syntax (which uses IDisposable, knowing which method to call), and LINQ (which I assume uses a heap of .NET stuff too). All of this seems very tied-in to the .NET framework. So: Could C# exist with a different framework? (Does it alrea...

Icon not displayed correctly in setup project VS 2005

Hi, I am making a setup project for my dependent project in the same solution, i have a icon for my dependent project which i set in project properties, i have also added this icon to setup project in the application folder, i want this icon to appear in the add/remove programs dialog but so far only default no icon is appearing. this ....

Is there any .net class for query conditions like DetachedCriteria in Hibernate, but not rely on Hibernate?

I'm writting a general DAO interface and facing a difficult in general Query operation. Query operation requires a set of query conditions. I'd like to give a interface like IList<TEntity> Query(DetachedCriteria criteria); But this makes the interface rely on nHibernate. If I want to use Linq or plain SQL, it is not easy to convert D...

.net micro framework deployment tool

Hi, i want to connect to my AT91SAM9RL board with the .net mfdeployment tool. It only has USB, JTAG and Serial Ports. Which normaly work fine when i use putty Segger GDB or Sam-ba. For some reason the micro frameworks deployment tool can´t find or connect to my board. Any advice ? ...

how to debug .net user control which is embedded in VB form

Can anyone tell me how to debug the VB 6.0 application in which a .Net user control(C#) is added as a control. I want to debug the user control code from VB 6.0 application. How to acheive this? ...

Different 'views' in a single WPF window

I'm doing a VB.Net subject at university and the major assignment is the creation of a WPF application. The application is management-focused (adding, modifying, deleting entries, etc). As these are all rather disparate tasks I'm thinking to create a tabbed interface for my assignment (in a similar vein to Spybot's interface: http://www...

Convert a .NET WinForms Application to a binary executable

I have a very low spec computer running XP Embedded (512Mb RAM, 512Mb HDD). IE 8 doesn't fit on it with .NET, so I was wondering if it's possible to compile a WinForm's project to a binary executable (making it independent of the .NET framework)... for what I am doing it seems like a bit of over kill to rewrite the executable in Delphi,...

Can you make sure all threads are started with a specific culture?

In my windows service, Spring.NET creates some threads handling jobs. Is it possible to make sure all these threads are started with a specific culture? Or do I have to set the culture in each thread? In ASP.NET, you can set the culture (globalization tag in web.config) at application level... can this be done in Windows Forms/Windows S...

arranging smallest to biggest integer.

string strArr="5,3,8,1,9,2,0,6,4,7"; I would like to rearrange the order of the numbers so the result will look like the following: string result ="0,1,2,3,4,5,6,7,8,9"; Any idea? ...

IronPython cannot import module os

Hello, So I have a basic ZIPPED IronPython (2.6 or 2.6.1) that I just unzip, start ipy.exe, type "import os" and hit enter. The following output happens: Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named os It doesn't work even if I import clr first. What's it to be done ? I've goo...

Suppress warning messages about downloaded executables in custom installer

We are writing a custom installer for our software. This installer will execute several other installer that are either transferred over the network or on a usb disk. When executing these in their own process we get Windows warnings that these installers might not be safe. Is there a way to suppress this type of messages? ...

Why is binary serialization faster than xml serialization?

Why is binary serialization considered faster than xml serialization? ...