.net

how can i learn my client ip with .NET?

i need my client ip from whatismyip.com. But Regex pattern is not correct i think? Can you help me this patttern? ...

How to generate tab-delimited txt file?

Hi I want to use SQL SERVER 2005 commands to generate tab-delimited file. I want to create a complex query and give it to something (say a function) to export data with columns names into a tab-delimited file. If u don't know something doing this, suggest an idea that reduces the headache of doing it from scratch using C#. AHH, I am...

From .NET to Delphi, an ERP on Delphi

I have learned programming on .NET. It's been 4 years since I have started (serious) programming, I gained experience in VBA, JavaScript but mainly C#. I have spent a lot of time trying to grasp the good coding practices, object orientation etc. Now finally I have a job. The job is fixing/upgrading an ERP on a daily basis. Creating repo...

WebService Timeout after a period of time

Hi, I have a project that uses a WS proxy to make calls to it; both the application and the WebService are located on the same computer. The application uses multi-threading to make requests to WS; the ws proxy is instantiated only once (singleton class) and used throughout the application; when i set 2 or threads in the application ev...

Why should you avoid to iterate over immutable value-type collections using foreach ?

In a coding standards document, I found this statement: Avoid using foreach to iterate over immutable value-type collections. E.g. String arrays. Why should this be avoided ? ...

Custom Dialog in .Net Setup Project

See Update Below I have been reading about creating custom dialogs for a .NET setup project at Code Project (http://www.codeproject.com/KB/install/vsSetupCustomDialogs.aspx) and I have the Orca tool installed and understand how to customize the dialogs. One thing, however, I can't seem to figure out. Is it possible to have a dialog tha...

How to build a very-low resolution timer ?

I need to implement a windows service that performs database import, and that once a month. The program receives data via e-mail, and will import them at the end of each month. Is there a better way than set the program to sleep for max_integer seconds/miliseconds repeatedly ? ...

Easiest way to find free IPAddress in current subnet?

What is the easiest way to find the next unused IP address on a local adaptors subnet? IPAddress GetNextFreeIP(NetworkInterface intface) { ...? } Update I've written a BOOTP/TFTP server that could be used in many different scenarios (cross-over cable, small private network, large corporate network). I have to give the small embedd...

How to assign a master page to a existing .aspx page ?

How to assign a master page to a existing .aspx page ? ...

C# - System.Transactions.TransactionScope

I was curious about the TransactionScope class. For the most part, I assume it was intended for database connections (which is what I've used it for). My question, is can you put any code in the using-block of a TransactionScope to make it transactional? MS documentation is not clear on this. If it can be used to make code other than...

How do I pass 2 parameters to Nant script?

Hello.. I have to write an Nant script that will accept 2 parameters on the command line. The first is just an option and has the following format: -myOption. The second one needs to be wrapped in quotes: "some value with space". e.g. -myOption "this value" I am new to Nant so I have unsuccessful so far and don't know how to output t...

Should I manually embed the data size info in a TCP transfer?

Imagine that you and me are sending a quite long sentence (say, 1024000 bytes) through TCP. If you write a 1024000 bytes sentence to me, you actually use NetworkStream to write those bytes in. When I receive, should I know in advance the size of the sentence you sent? If not, how can I check when I should stop the stream.read? If yes...

Parse numbers from string using regex in VB.NET

I am trying to parse the digits to store in a variable from a string in VB.NET (would like to also include the decimal point). Here is an example string: Refund issued for $27.74 ...

How to create an OpenOffice document in .NET

I am starting to write an application that will output an OpenOffice document. The content.xml file in an empty ODT document begins: <?xml version="1.0" encoding="UTF-8"?> <office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xml...

What .NET time series libraries are there?

I am looking for a .NET library for time series work. It can be either free or commercial. My basic requirements are the following: Handle time series in varying frequencies (daily, business daily, week ending Friday, monthly, quarterly, annual, etc). Convert between different calendar frequencies, going from both high to low frequency...

Sybase Advantage Database server and 64 bit VFP OLE providers

Does anyone know if the sybase ads vfp provider works in 64 bit? Currently we have to build our .NET applications targeting x86 to be able to use the vfpoledb provider that only runs in 32 bit. Any solutions or suggestions would be appreciated. ...

How do I get the name of parent method/class/file name inside other method call?

Hi, I will try to explain what I need. Let's say that I have a class like this: Public Class Example1 Public Sub ToBeCalled() System.Console.WriteLine( "The Method or Class or file and its line which called me is: ", ?????) End Sub End Class Then I have a second class like this: Public Cl...

Convert IEnumerable to EntityCollection Entity Framework 4

I have generated the following code with Entity Framework 4 for a navigation property: <XmlIgnoreAttribute()> <SoapIgnoreAttribute()> <DataMemberAttribute()> <EdmRelationshipNavigationPropertyAttribute("Diagnose", "Request_Comments", "Comment")> Public Property Comments() As EntityCollection(Of Comment) Get Return CType(Me,I...

What's wrong with my Nant Record task?

Hey everyone... I have the following in a build script: <record action="Start" autoflush="true" name="${nant.log}"/> The name value is valid. I get the following error message: Invalid element <record>.Unknown task or datatype. After looking at the documentation I am not sure why this is causing an error. Any ideas? ...

Google Adwords CSV File Parser

Hi! I'm using Google Adwords CSV export feature to parse some reports and format them the way I want. The problem is, however, that i can't find any CSV parser that is able to handle my adwords reports. The biggest issue is that column headers is not placed at the first row, but the sixth. Does anyone know a good CSV reader that is ab...