I've got a simple function that takes a List parameter. While working with it, it copies it and reverses the copy using .NET's List(Of T).Reverse method.
Private Function FindThing(ByVal Things As List(Of Thing)) As Thing
Dim ReverseOrderThings As List(Of Thing) = Things
ReverseOrderThings.Reverse()
For Each t As Thing In R...
I have a Windows Forms ListView in a form (C#, VS 2005) and have it anchored to all the edges of the form so that it entirely fills the form excluding the status bar. The ListView is in detail mode and the columns are very wide - definitely wider than the display area. I have a vertical scrollbar but no horizontal scrollbar.
I can scr...
How can I have any uncaught exception get returned as a SOAP fault in my C# web service? It appears that IIS is 'catching' the exception and displaying it on the default error. Below is santized web.config.
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="hibernate-configuration" type="NHibernate.Cfg.Confi...
I've got a .NET Windows application that's deployed via ClickOnce to a Web server. There are approximately 100 users at any given time, all centrally located. I'm using log4net to log within the application, but I'm having trouble arriving at the best place to put the log.
I've tried having them write to a shared network location, but s...
How do I convert from excel serial date to a .NET date time?
For example 39938 is 05/05/2009.
...
Anyone have experience with compiled query syntax for VB? I'm used them a few times in C#, but can't seem to make the translation. My code is below:
#Region "Locals"
'Data context objects '
Private _dbOrderInfo As New OrderInfoDataContext
#End Region
#Region "Delegates"
Public Shared ReadOnly Func(_dbOrderInfo, Boolean, IQu...
In .NET is it possible to generate class diagrams (.cd) programmatically (C#)? If so how?
PD: Obviously I'm not asking for directions of how to generate this using the IDE. I know that I can drag and drop the classes to a ClassDiagram item.
...
Greetings,
I'm confused as to the best approach to make when consuming REST based web services with .Net. At the moment I'm using the System.net.webclient class. Should I be using Webresponse, webrequest classes in System.Net ?
If I were to use another approach (Other than webclient) what disadvantages / advantages would I gain ?
Tha...
I'm wondering if it's possible for .Net's String.Format() to split an integer apart into two sub strings. For example I have a number 3234 and I want to format it as 32X34. My integer will always have 4 or 6 digits. Is this possible using String.Format()? If so what format string would work?
P.S.
I know there is other ways to do this, ...
I know that I can access the cyclomatic complexity to my code in Visual Studio 2008 Team Explorer by right clicking and selecting "Calculate Code Metrics". I would like to expose this data for a web application to display it. Does anybody know of any way of accessing this data through an API?
Thanks for your help!
...
I'm starting with OpenId using the dotnetopenid library and, so far, so good, but when I try to login, it shows me the following message:
This message has already been
processed. This could indicate a
replay attack in progress.
The first time I used my app it failed and, after that, the above message it is always returned.
How...
I am building a .NET based windows service. Part of its functionality is supposed to be checking if a newer version of itself is available on a site. It is then supposed to download the new "package" and somehow upgrade itself. Anyone know of any libraries that can help with that? I am assuming I will run into issues of overwriting the e...
The exception from the subject line is thrown when I am trying to load an XSL spreadsheet. The call stack is attached below. This program worked for a while with a variety of style sheets now it works on some comuters but throws this exception on some other. I looked it up on the internet but this is all I could find and it does not give...
I want to create a WebUserControl (not a custom control) in asp.NET (C#).
I want to have <param> tags that can be put between the control's start/end tags when being used in an aspx page.
Eg:
<abc:myWebUserControl id="myWUC" runat="server">
<param name="pName1" value="pValue1">
<param name="pName2" value="pValue2">
<param n...
I have an image that I have created in memory as Format24bppRgb.
I save this as a PNG and it is 24kb.
If I save the same image with photoshop as a 24bit PNG it comes to about the same size, but if i save it as an 8bit PNG with only 32 colors it goes down to 5kb.
How can I create an indexed version of a PNG file using C# / GDI+ / Syste...
C#, .NET 3.5
This just smells of ugly to me, but I can't think of another way.
Given a string with the format of "Joe Smith (jsmith)" (sans quotes), I'd like to parse out just the 'jsmith' string within the parenthesis. I've come up with this:
private static string DecipherUserName( string user )
{
if( !user.Contains( "(" ) )
...
I have the following code to perform a database level operation through our active record ORM layer.
public static void Vacuum() {
Execute(
delegate(ISession session, object instance) {
ISQLQuery query =
session.CreateSQLQuery(@"
VACUUM billableaddresses;
")
query.List();
return null;
...
I have a silverlight app that I want to support plugin development for. I'm thinking that the plugin developer would create a dll and my main silverlight app would have some sort of config file that you would list the dll and type of the plugin, and the main app would detect, download, and load the dll for the plugin.
Does this sound...
I'm in a situation where i need to start learning some .net to work with some application at work.
Currently my knowledge is mainly in python and php so i'm interested in taking the iron python route to learning and implementing .net .
Is this a good idea by any stretch and/or is there any good resources to get started learning?
...
I have what seems to be a simple problem that I can't solve myself. I have a WinForm app, with main method modified to accept command line arguments like this:
[STAThread]
static void Main(String[] args)
{
int argCount = args.Length;
}
This code works fine and argCount is equals to 2 when compiled in debug mode...