Assume you have the following code:
Instead of doing:
Try
'
' Initialize some objects
'
'
' do something that fails
'
'
' Clean up-code that gets not reached because exception
'
Catch e As Exception
'
'Clean up initialized objects
'
Throw e
End Try
I would like to do:
Try
'
...
How to implement explicit interface implementation in VB.NET?
...
I have a problem transmitting a file-sized thingy through WCF which uses the named pipe binding
<netNamedPipeBinding>
<binding name="largeMessage"
maxBufferPoolSize="524288000"
maxReceivedMessageSize="655360000"
maxBufferSize="655360000" >
<readerQuotas maxStringContentLength="655360...
I've been adding a bit of animation to my WPF application.
Thanks to Dan Crevier's unique solution to animating the children of a panel combined with the awesome WPF Penner animations it turned out to be fairly straightforward to make one of my controls look great and have its children move about with some nice animation.
Unfortunately...
I need to write code that reads the corflags of a .net assembly without loading it through reflection.
It takes relativly long time to load an assembly so I am looking for something that will open it as a stream and analize the binary stream.
Where do I find information about the assembly binary metadata struture?
Is there any code sn...
I want to get the first few words(100 or 200) from a long summary of words (plain string or html) using c#.
My requirement is to display the short description of the long summary of content(this content may include html elements). I'm able to retrieve the plain string but when it is html, the elements are cut it between Example, I get l...
I have created a .NET C# WinForms application on Win 7 RTM x64, which let's say I have called DataInstaller.
When I run this program outside of the debugger (just an empty form with no functionality at the moment), it works fine until I close the form. I then get a message from the Program Compatibility Assistant that says:
This progra...
Hi All, newbie on site.
I have a new project, requirement are:
Organised groups of users at multiple geo locations answer test questions using this software.
We cannot rely on consistent internet connection, in case it goes down during test.
My question's are:
Q1. Based on assuming no internet connection, I guess I have 2 options?:...
We have a non-localized WebForms app written in VS2005/.NET 2.0, and are looking to localize it.
Are there any significant changes between .NET 2.0 and .NET 3.5 in the area of localization (either framework features or Visual Studio tools) that would make it worthwhile for us to upgrade the project?
...
I'm starting with linqToSql and I still have some problems making my queries.
For example, I want to retrieve in the same query two values, a subset of elements, and an integer with the count of the elements. This is how I did it separately:
int totalElements;
IEnumerable<ClsTax> result;
result = (from t in db.tax
sel...
I am using codeplex NVelocity library on .net and i want to catch an error when I execute Evalute method on VelocityEngine instance and one of the parameter in template text was not found.
How can I obtain this?
I find IInvalidReferenceEventHandler interface in NVelocity.App.Event namespace but I dont't find any information how to use ...
Hi All,
I've got a number of utilities that run on the same machine as my IIS webserver.
What I'm trying to do is allow a web page to instantiate an executable. If I use Process.Start() the process launches but obviously as the same user as the webserver so it can't interact with the desktop. For 99% of the apps, this isn't a problem. ...
Asynchronous and concurrent programmings seams to be on everyones minds these days and .NET 4 adds a number of improvements such as built-in thread safe collections and of course tasks. On top of this I've started looking at the Reactive Framework (Rx).
Tasks appears to be primarily more focused on concurrency for computation performanc...
I guess the default path for the SQL Server files is located at:
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA
Is there any way of reading the default directory with the .NET Framework?
...
Is there a common way to pass a single item of type T to a method which expects an IEnumerable<T> parameter? Language is C#, framework version 2.0.
Currently I am using a helper method (it's .Net 2.0, so I have a whole bunch of casting/projecting helper methods similar to LINQ), but this just seems silly:
public static class IEnumerab...
How can i use LINQ with ServiceModel.Channels.Message? I'd like to use LINQ to the SOAP message body.
I initially tried doing this:
XElement elem = XElement.load(message.GetReaderAtBodyContents());
But that piece of code complains that XMLReader should be EOF after the read operation. What is the correct way to do this?
...
By "variable format" I mean that each row in the text file begins with a single character code denoting the record type, and each record type has a different format. I believe this is some sort of fairly common mainframe data export method. What makes matters worse is the fact that the record types are actually hierarchies. The codes in ...
I'm making this tiny utility program (Windows Forms) and it would need to save a bit of data to the disk. In DB terms it would be about one table, no more than about couple thousand rows, each row being less then 1KB in size.
What would you use?
Added: Forgot to say - it would be really neat if the whole program would be just one .EXE ...
I'm trying to add some extra logging to my C# winforms application. I have a few data bound forms that all the database stuff is managed by a binding source and some typed datasets/adapters.
With this setup, it's kind of difficult to tell when something is changed, I'd have to manage each field and keep it's previous value. Is there a w...
Hi,
I'm using a3rd party component in my project and I recently upgraded to their latest version which fixed bug 'A'
unfortunately, while it solved bug 'A', another part has gotten completely unstable, so it introduced a bug 'B'.
Since 'A' and 'B' are in completely different contexts, I want to have both versions of the control instal...