I have a text file that is being written to as part of a very large data extract. The first line of the text file is the number of "accounts" extracted.
Because of the nature of this extract, that number is not known until the very end of the process, but the file can be large (a few hundred megs).
What is the BEST way in C# / .NET to ...
I have a WPF Toolkit Datagrid with 3 columns. Only the third column allows data entry - the first two are static (Text descriptions). Is it possible to control tabbing and navigation such that the tab and up-down-left-right buttons will ignore the first two columns and operate within the confines of the third?
Thank you
Jason
...
Hi all
I need to be able to detect which version of Excel I have installed in my machine from some .NET code I'm developing. I'm currently using Application.Version for that, but it doesn't give me information about Service Packs.
I would preferably to steer away from something like this:
http://www.mvps.org/access/api/api0065.htm
Ma...
There are a number of ways to compare strings. Are there performance gains by doing one way over another?
I've always opted to compare strings like so:
string name = "Bob Wazowski";
if (name.CompareTo("Jill Yearsley") == 0) {
// whatever...
}
But I find few people doing this, and if anything, I see more people just doing a straig...
I have taken on a project that has been underway for months. I've yet to ever do unit tests and figured it would be a decent time to start. However, normally unit tests are written as you go and you plan for them when beginning the project. Is it reasonable for me to start now? Are there any decent resources for setting up unit tests...
I'm trying to debug an "occasional" problem. We've got a classic ASP application that needs to send email. For whatever reasons it's using a C# object exposed via COM to do this send; the c# object is a simple wrapper around MailMessage and SMTPClient, using SendAsync to do the send. On the ASP side the object is Server.CreateObject()'d ...
Pdf created with iText will not open in IE with machine that has Adobe Pro installed. Works great in otherwise. Browser setting? Thanks in advance.
related code: Response.ContentType = "Application/pdf";
...
I need to add a functionality in an application (C#) which will use a web service (XML SOAP service).
Now this application can (and mostly) be used in an corporate environment which has a proxy server in place.
I understand the SOAP services use HTTP protocol and hence should use port 80, which is normally kept opened. Is it right that...
Ever since .net 2.0 release this question has been discussed over a large number of times. Many of the developers are not in favour of Typed datasets and there are few who use them practically.
The goal of the question is to identify the reasons why one should use or not use Typed datasets in their applications.
In my case, I personall...
I am placing user data in the session then passing it to viewdata to view on a page. Now when my user walks away from his computer for a while, the session ends and the data he entered is lost.(that is ok) The problem is that when he returns he refreshes the screen my page is still showing but all the data is gone. So,
How can I redirec...
I am able to Bind my DataGrid in .NET 3.5 CF to a List() but I am unable to format the columns by specifying their width. Below is the code that looks like it should work but does not. I am pretty sure that I am not setting the MappingName correctly as all tutorials tell you to set it to the name of your DataTable but I am not binding t...
I have been told that the Provider pattern is a way to design loosely coupled components. I am working on designing an API. Could you please point to links where Provider pattern is explained. I found one here, are there any more that describe provider pattern using .net as the framework
...
I'm adding data rows to my data table but the row count in the data table does not increase. Seems to be a limit of either size of the table or number of data rows.
FYI, .net 2.0
...
Is there any way to determine if an XBAP (WPF hosted in a browser) application has network connectivity? If not, how would a traditional windows client written in C# and .NET determine if it has connectivity?
Basically the use case is an XBAP application running on a mobile laptop connected to an intranet via WiFi. The laptop will not h...
Ok, so since going to version 2.5 Nunit is causing me all sorts of problems because they introduced the static class Is into the nunit.framework namespace.
It would be well and good if Rhino.Mocks and a few other frameworks did not also make use of an Is static class. So now if I upgrade to 2.5 most of my code that uses rhino mocks con...
I was poking around in .NET Reflector, and noticed that for reference types like "String" for example, there is an explicit overload of the "==" operator:
typeof(string).GetMethod("op_Equality", BindingFlags.Static | BindingFlags.Public)
returns: System.Reflection.MethodInfo for the "==" operator.
Due to its implementation, you can't...
I have set up a basic html table with a reader in each cell (don't ask) that exports to excel, I also have a datagrid that exports to excel. Both work without issue in regards to actually creating the spreadsheet, but I have a question regarding formatting. Inside each cell is a list of names, i.e.:
Bob Smith Jim Bob
John Miller ...
The error message is "The type or namespace name 'T' could not be found."
???
public static Expression<Func<T, bool>> MakeFilter(string prop, object val)
{
ParameterExpression pe = Expression.Parameter(typeof(T), "p");
PropertyInfo pi = typeof(T).GetProperty(prop);
MemberExpression me = Expression.MakeMemberAccess(pe, pi);
...
I am trying to generate PDF files containing large numbers of tables. Each PDF could potentially be 150 pages in length.
When using ITextSharp, the file sizes are up to 16 megabytes and have no noticeable shrinkage when zipped.
When using PDFSharp, the file size is very reasonable at 2 or 3 megabytes but it takes an unacceptable l...
I want to change my window template, eg:
<Style x:Key="SilverGreenWindowStyle" TargetType="{x:Type Window}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Grid Background="{StaticResource SilverGreenBackground}" Width="503" Height="383">
<Rectangle Margin="192,...