.net

Are the programs included in the Web Platform Installer all free?

Are the programs included in the Web Platform Installer all free? I was under the impression that it was all open-source, free software. But it looks like at least nService isn't: http://www.avensoft.com/nservice.html ...

Does a .NET Web Service instantiate with each method call?

I'm trying out web services for an idea I've had. Running in debug it looks like the web service class instantiates each time a client calls a method in the web service. I can see this by seeing that the constructor gets called each time I call a method. I only instantiate the proxy web service once in the client. This would mean I wou...

What is the most under-valued part of .NET?

The .NET framework is massive. I've used it for years and I've still not used most of it. I'd like to expand my knowledge of the Framework's backwaters but just reading thought it seems daunting. So I thought I'd tap up the Stack Overflow community first. What part have you found to be the most surprisingly useful? What's your favouri...

GetCustomAttribute() returns null for AssemblyVersionAttribute

I'm adding an About dialog to my .NET application and I'm querying the assembly's attributes for information to display. When I attempt to retrieve my assembly's AssemblyVersionAttribute using GetCustomAttribute() it returns null: // Works fine AssemblyTitleAttribute title = (AssemblyTitleAttribute)Attribute.GetCustomAttribute( ...

Interface Type Constructor

In chapter eight (p189) of "CLR Via C#", Jeffrey Richter states that: "A Type constructor can be applied to interfaces (although C# doesn't allow this)" I've done a little bit of research and I can't seem to find why an interface would ever need a type constructor, in any language. This seems like something that you would explicitly di...

XslTransform.Transform to produce multiple output files

I need to produce multiple HTML report files from an XML data file and I'm using C# (.NET 3.5). I essentially need on HTML report for each of certain child trees in the XML file (but they have to include some parent info). I've decided to use XSLT, because it seems to be the most elegant solution to my problem. I can then use the .NET X...

Linq to SQL Templates in .NET 2.0 Projects

I can't find a template for a linq to sql class in .net 2.0 project, based on what i know you can work with linq in .NET 2.0 as long as you have 3.5 in your development machine and ship system.core.dll with your application? so based on that how can I add a Linq to Sql model to my project when "Linq to Sql Classes" template is missing ...

Programming References Anyone?

Since I started working I go to StackOverflow for everything. But as we all know it is good to have many ways to skin a cat. where is your other favorite website to visit for programming Reference? ...

Where should I start if I have to get into SharePoint as well as ASP.NET?

I am a fairly experienced Programmer - but my field has been Lotus Notes. So i am not familiar with OOP. I want to get into Sharepoint Development and wanted to know where to start. The basic understanding that I have (after reading some of the answers to similar questions here) is that I will have to study C# and ASP.NET. What I want to...

Is there a way to to find out if a caller is highly trusted WITHOUT potentially throwing an exception?

Hi! The following code works but it uses a security demand, which in my application all too often often leads to a SecurityException being thrown. As you can see the code handles this just fine but I'd like to speed it up if possible. Any suggestions on how to improve things would be greatly appreciated! using System.Security; using ...

.Net Service and Windows App at the same time?

When you create a Windwows Service, you end up with a .exe file that you need to register, and you start it from the "Services" snap-in. If you try to execute this .exe file, you get the message: "Cannot start service from the command line or debugger. A Windows Service must first be installed (using installutil.exe) and then started wi...

How to add Custom Attributes to a DynamicMethod-generated method?

I was playing around with DynamicMethod and Expression Trees' Compilation (which uses DynamicMethod internally). I then wondered if there is a way to add a custom attribute to the generated method. I googled about it, but I couldn't find a way. I know that it's possible to do using CodeDom, but I want to use DynamicMethod. Someone ment...

CONCAT and SQL

I have to search a DB2 database for a string that is a concatination of two columns. Is there a way to CONCAT the columns then use the combined string in the WHERE clause? I've searched but can't seem to find an answer to this. Thanks ...

SQLite3 in C#.NET

Hello once again. I'm trying to use SQLite3 in C#.NET. I've googled around and found some different API's. I also checked SQLite's website for wrappers. I like them, but want to write my own wrapper without using an added dependency. All wrappers I find that don't require an added dependency aren't free. I'm wondering how one would rea...

Nested Loop scenario, getting values before exception in debug mode - Visual Studio

If I have a nested loop scenario and I am stepping into it in debug mode. Ex: for (int i = 0; i < listTest.Count; i++) { for (int j = 0; j < anotherList.Count; j++) { //Some logic that throws an exception } } Is there a way for me to know the values of i, j, listTest[i] and anotherLIst[j] just before the exception occur...

C# to VB .NET yield return conversion

Hello, What's the translation of this snippet in VB .NET? public static IEnumerable<TSource> Where<TSource>( this IEnumerable<TSource> source, Func<TSource, Boolean> predicate) { foreach (TSource element in source) { if (predicate(element)) yield return element; } } ...

Is Boo 100% C# compatible?

Boo seems like a very cool language. Is it 100% C# compatible? I mean: can I use any C# DLL/class? Could I make use of the XNA framework? ...

Where can I find a list of Powershell .NET Type Accelerators?

In PowerShell you can use [xml] to mean [System.Xml.XmlDocument]. Do you know where I can find a list of these type accelerators? Are these accelerators specific to PowerShell or .NET? ...

What is the best way to make a single instance application in .net?

Possible Duplicates: What is the correct way to create a single instance application? Prevent multiple instances of a given app in .NET? Do I check whether another process with the same name exists? (What if the user doesn't have permission to do that?) Write a file to disk and delete it before exiting? (what about abnormal t...

.NET - JSON Data - Deserialization - Lists & Dictionaries

I need to pull back from a database JSON documents that are not based on a standard object. Is there a way using .NET to "deserialize" these documents into Lists & Dictionaries of primitive objects (string, int, bool, etc...) Any library that can do this in both directions? ...