.net

What should i know about F# before starting a large project?

I don't know much F# and i never used a functional programming language in the past (i was interested in oCaml). I am about to rewrite my entire website and i think i want to do it in F#. I would like to know if there is anything i should know about before starting or development. NOTE: The site is fairly large and MUST be maintained fo...

WebBrowser Control in a web application

I tried to use the WebBrowser control in an ASP .NET application: public BrowserForm() { webBrowser1 = new WebBrowser(); webBrowser1.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(webBrowser1_DocumentCompleted); } private void webBrowser1_DocumentCompleted(Object sender, WebBrow...

Disabling all the Page Control through jQuery.

I am working on asp.net and c#. I am using lots of ASP and HTML controls on the page and in some cases all the controls gets disabled. Some of the used Controls are: RadioButton RadioButtonList CheckBox CheckBoxList TextBox DropDownList Button etc... I need a Simple and short method to disabled all the Controls when i call this jQuer...

How to refactor overloaded methods

I have the methods: public MyReturnType MyMethod(Class1 arg) { //implementation } public MyReturnType MyMethod(Class2 arg) { //implementation } //... public MyReturnType MyMethod(ClassN arg) { //implementation } decimal, string, DateTime in [Class1, ... , ClassN] and one common method: public MyReturnType MyMethod(object obj) {...

Using an XPath-style Query with Reflection

I have a class tree, which contains multiple objects in a hierarchy. So I might have a Container object, which hosts 3 SubContainer objects, which in turn host an arbitrary number of Item objects. Is there any way that I can use an XPath-style expression over this object tree, which would imply reflection, so that I could query a proper...

Assembly re-direction in .NET

I have C#.net exe to which i add reference to third party dll's. These third party dll's are strong named assemblies registered in GAC. I compile my program with third party dll's(say version 7.0). When i try to register my C#.net exe program in a machine which has the third party dll'S(say version anything above 7.0) registered in G...

VSTO for the Mac?

I have built a custom Outlook toolbar option using VSTO which logs an email in a database. This works fine in Windows. However, I’ve been asked if we can migrate this to the Mac for Entourage which I think is the Mac version of Outlook. Can a VSTO application be ported to the Mac? Is it possible to build custom toolbar options in Entoura...

Unable to read in my custom .config section

Hi folks, NOTE: this is very very similar to this SO question, but I need some more help. i'm trying to make the following section in my .config file, but i get an exception when trying to access this section. .config file <configSections> <section name="foos" type="Ackbar.Mvc.Models.Foo.FooCollection, Ackbar.Mvc" requirePermissi...

Why can't I derive from System.Enum abstract class?

MSDN defines System.Enum as an abstract class: [SerializableAttribute] [ComVisibleAttribute(true)] public abstract class Enum : ValueType, IComparable, IFormattable, IConvertible And also MSDN make such statement about abstract class: An abstract class cannot be instantiated. The purpose of an abstract class is to provide a co...

Modeling loosely coupled domain model

Hello, The question doesn't really concerne DDD but would like to know if there is any way to model a loosely coupled domain model. What I mean by that ? I work for a software HR editor and we're planning to start a new application from scratch. We did an audit of all projects we did for our 150 customers and the fact is that we can't s...

Negate or Not Condition-Element for MultiTrigger

I´m currently learning WPF and the use of MultiTrigger and Conditions to set some properties of the styled control. I know that the Conditions of an MultiTrigger must all met (AND-Operator) to set the value specified by the Setter. But does there exists a Condition if the value is not met (Lets name it a NotCondition). I have a small ex...

Filtering out Sitecore Items before the databind

I want to filter out / remove items from a list of type Sitecore.Data.Items. This is how i fill the list. List<Item> actueelItems = Sitecore.Context.Database.SelectItems("/sitecore/content/destil_nl/Home/").ToList(); I have a method that checks wheter an item is valid. This will return true or false. I want to put up a new list, that ...

Using Ninject, if I create a custom provider must I ensure a single instance or can I use the SingleInstance attribute?

Hi I am hoping either Peter or Ruben sees this question as they seem to be the go to guys regarding Ninject. I needed to create a custom provider because I have a class that takes 4 arguments. The two can be injected because they are types but the other two are configuration parameters and are integers. They refer to timeouts in millise...

In which order to read the C#/.NET books?

C# / .NET Books (Descending Order): O'Reilly C# 4.0 in a Nutshell? Accelerated C# 2010 Introduction to .NET 4.0 and Visual Studio Effective C# Microsoft Press C# via CLR 3rd Edition APress C# 2008 and .NET 3.5 Platform List has been modified based on the answers and comments below. ...

build error in VS2008/.NET 3.5 on project using ClickOnce

Hi Guys In one my VS2008 solution (used with .NET 3.5), sometimes, I get the following error when I try to rebuild one of my project: error MSB3188: Assembly 'somePath/blabla.dll' must be strong signed in order to be marked as a prerequisite. Another thing to know about the project is that I use ClickOnce to publish it. as ...

Linq to SQL on Mono?

Is it possible "in anyway" that I can use Linq to SQl on a Mono project? If it's actually .net port then if I import the System.data.Linq and the DBML that generated in VS, will it work? THanks! ...

What is the standard way to add controls to a TabPage at Design Time?

I am creating my first Windows Forms application, to be deployed on Windows Mobile and I am having some trouble designing a Tabbed Interface. I had assumed that I could Create a TabControl, then Add some TabPages and then drag Controls on to each Tab Page in turn. This does not appear to be possible and most of the information I see on ...

Can i use .net framework 4 with visual studio 2008 IDE

Possible Duplicate: Can I use .NET 4.0 beta in Visual Studio 2008? Hot can I use visual studio 2008 IDE with .net framework 4? ...

Where Is Machine.Config??

I want to change to use Server GC - I can do that by using the machine.config The only problem is I do not know where that is ...

Default .NET Runtime Version

I have a few .NET versions under C:\WINDOWS\Microsoft.NET\Framework\ What system variable controls what gets run by default?? ...