.net

Desktop mono app and MVC/MVP framework

I am looking for a MVC/MVP (mvp prefferably) framework for my first mono app. There doesn't seem to be too much out there, but I have found the following: http://www.mvcsharp.org/ http://desktoprails.osl.ull.es/doku.php I've been looking into both for some time, and MVC# seems to be closer to what I want. The issue is that MVC# seem...

Console application question

Hi I was wandering why when I create console application and 'transform' the main method to look identically with main method auto-generated when creating windows forms project, the console still appears on the screen: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using Sy...

What is the best conference in the United States for Software Developers

Nowadays, it seems like conferences for software developers are disappearing. The last one I attended was the Tulsa TechFest and OWASP Hartford. I am curious if there are events that are not on my radar that should be? The criteria I seek: Multiple day format Speakers are practitioners, not vendors and industry analysts Under $400 In a...

C# Console Problem

Consider this class: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Game.Items { class Item { private string name; public string Name { get { return this.name; } } private string description; public string Description ...

Why won't my WinForms app compiled for "x86" exit on an "x64" machine when running outside "C:\Program Files (x86)"?

We have a WinForms app that runs fine on x86, but has many third-party components that make win32 calls. To get the apps to run on x64, I now compile for the x86 platform. Our habit has been to install our thick-client outside the system partition on servers, so we installed in "F:\Program Files (x86)" yesterday on a Win2003 x64 server. ...

Best practice for renaming property/method names that are reserved words?

I'm creating a car class. Make and model are properties but both make and model appear to be reserved words in C#. What's the best practice for naming properties/methods when your preferred name is a reserved word? My first instinct is to call the properties CarMake, CarModel (so a convention of ClassNamePropertyName). Is there some bet...

Differences between UNIX and Windows development

I've been programming in C and C++ in Linux for around 3 years, and recently have been interested in developing commercial software for businesses. Let's say I've found a niche where I think I could be successful, but that they only use Windows. I have no experience whatsoever with the Windows API, however. I have a few questions: Sh...

How to decide if a method will be private, protected, internal or public? (C#)

I am designing a class where some methods won't cause any harm if they are exposed as public. But they can be private as well, since they will be used only from the same class in my project. Making them public has the following advantages: Unit Testable without the need of accessors. Flexibility. Making them private has the followin...

How can I parse descriptive text to a DateTime object?

Are there any existing libraries in existence that will parse a datetime from a plaintext phrase? I'm looking for something similar to Remember The Milk or Outlook, where the user can enter "next tuesday at 6pm" or "tonight at 7" and the library can spit out {4/28/2009 18:00:00} or {4/25/2009 19:00:00}. I'm considering writing my own, bu...

Disable Javascript popups when using Windows.Forms.Webbrowser.Navigate()

Ok, I have a very frustrating problem. I am parsing a webpage and need to have it execute the javascript in order to get the information I want. Form f = new Form(); WebBrowser w = new WebBrowser(); w.Navigate(url); f.Controls.Add(w); f.ShowDialog(); HtmlElementCollection hc = w.Document.GetElementsByTagName("button"); This works and...

C# class both extends an abstract class and implements an interface

What if I have a class that both extends an abstract class and implements an interface, for example: class Example : AbstractExample, ExampleInterface { // class content here } How can I initialize this class so I can access methods from both the interface and the abstract class? When I do: AbstractExample example = new Example(...

Developing .Net that deploys to a different Active Directory.

Situation is you have to develop an application against an Active Directory Tree. Want to use Role based security based on AD user groups. The deployment tree is unavailable, no trust exists or is allowed between the development tree and deployment tree. What are the best practices for developing the application and then deploying. Firs...

CSLA.Net V3.6/NHibernate V2.10 ; how to overcome need for vitual properties

With CSLA.net, all domain classes need to inherit from Businessbase, which contains non-virtual properties. When using NHibernate, we need to implement virtual properties for lazy loading. Some options to use CSLA/NHibernate together seem to be: switch lazy loading off in NHibernate and implement lazy loading code in the domain cl...

Debugging outofmemoryexception

In the bug fixing of a small ASP.NET/C# web app I have made, I have encountered an OutOfMemoryException. There is no tips as to where to look as this is a compile time error. How can I diagnose this exception? I am assuming this is exactly where memory profiling comes into play? Any tips? Thanks ...

Simple data - I just need simple way to analyze

Summary I am after some advice on the easiest way to analyze simple data using SQL server and .net Details Really simple data - just need really simple way to analyze (with my simple brain) I have a SQL Server table: PKID (Int) ApplicationName (VarChar) MethodName (VarChar) TimeInMs (Integer) AdditionalInfo (VarChar) DateTime (Da...

Will System.Numerics.BigInteger be immutable? Should it be?

The .net framework 4 is apparently going to include a BigInteger class. However, I can't seem to find out whether or not it will be immutable. I also can't seem to decide whether or not that would be a good thing. Immutability has a ton of benefits, especially for something as "value-like" as a big-int. On the other hand, the basic oper...

Question about ComboBox and Linq to Sql for Winforms...

Edit: More than a day. Still no answer! Is question not clear? I have ComboBox bound to BindingSource which in turn is bound to Linq Table. Also, ComboBox is filled from datasource which is a Linq Table. I want to assign new value to one of properties of BindingSource.Current whenever user selects item in ComboBox. I understood from M...

How can I get at the raw bytes of the request in WCF?

For logging purposes, I want to get at the raw request sent to my RESTful web service implemented in WCF. I have already implemented IDispatchMessageInspector. In my implementation of AfterReceiveRequest, I want to spit out the raw bytes of the message even (and especially) if the content of the message is invalid. This is for debugging...

Adding and removing tab pages at runtime in C#

I have a program that I want each person to have their own tab, each tab would be identical, however I would like to remove a tab if I need to. private void addPerson(string name) { TabPage tmp = new TabPage(); ListView tmpList = new ListView(); Button tmpButton = new Button(); this.SuspendLayout(); this.tabFrame.SuspendLayout...

Issues with .net gzip decompression stream

What could be wrong with those set of methods? byte[] bytes; using (var memory_stream = new MemoryStream()) using (var gzip_stream = new GZipStream(memory_stream, CompressionMode.Compress)) { var buffer = Encoding.Default.GetBytes("Hello nurse!"); gzip_stream.Write(buffer, 0, buff...