Re: [ADVANCED-DOTNET] Nullable(Of String)

2007-12-06 Thread Mark Hurd
On 07/12/2007, Peter Ritchie <[EMAIL PROTECTED]> wrote: > On Fri, 7 Dec 2007 00:50:06 +1030, Mark Hurd <[EMAIL PROTECTED]> wrote: > > >Following on from the thread "another generic query", what is the > >simplest way to implement Nullable(Of String) when that IS what you > >want. > > > >E.g. You ha

Re: [ADVANCED-DOTNET] .Net 2.0 Sp1 breaks http path for config file in appdomain?

2007-12-06 Thread John Brett
> Is anyone able to at least confirm my findings so I know I'm not going mad? We got bitten by the change to the Uri class. Fortunately, our unit tests picked it up, and it was a straight-forward change (from memory, I think we were building up a uri, and had ended up with two consecutive '/'s,

[ADVANCED-DOTNET] .Net 2.0 Sp1 breaks http path for config file in appdomain?

2007-12-06 Thread Phil Sayers
Hello, I'm having a problem where our application breaks after installing .Net 2.0 SP1. Using reflector I see there are code changes in the System.Uri Class, specifically this method: InitializeUri(ByVal err As ParsingError, ByVal uriKind As UriKind, ByRef e As UriFormatException) This method

Re: [ADVANCED-DOTNET] another generic query....

2007-12-06 Thread Mark Nicholls
thanks for the answers. I couldn't find any documentationbut I understand now. === This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com

Re: [ADVANCED-DOTNET] Nullable(Of String)

2007-12-06 Thread Peter Ritchie
On Fri, 7 Dec 2007 00:50:06 +1030, Mark Hurd <[EMAIL PROTECTED]> wrote: >Following on from the thread "another generic query", what is the >simplest way to implement Nullable(Of String) when that IS what you >want. > >E.g. You have a String property and setting it to any value, including >Nothing,

Re: [ADVANCED-DOTNET] Nullable(Of String)

2007-12-06 Thread Barry Kelly
Mark Hurd <[EMAIL PROTECTED]> wrote: > Following on from the thread "another generic query", what is the > simplest way to implement Nullable(Of String) when that IS what you > want. > > E.g. You have a String property and setting it to any value, including > Nothing, needs to be differentiated f

[ADVANCED-DOTNET] Nullable(Of String)

2007-12-06 Thread Mark Hurd
Following on from the thread "another generic query", what is the simplest way to implement Nullable(Of String) when that IS what you want. E.g. You have a String property and setting it to any value, including Nothing, needs to be differentiated from its default value say. I decided to create S

Re: [ADVANCED-DOTNET] another generic query....

2007-12-06 Thread Efran Cobisi
Here the compiler enforces the T parameter of the Nullable class to be a non-nullable type, thus avoiding nested nullability tests on instances of that type. This check has been introduced after .NET 2.0 beta2, because it lends to cleaner code. Before that, it was legal to have a Nullable, for exa

Re: [ADVANCED-DOTNET] another generic query....

2007-12-06 Thread Ryan Heath
X? is a shortcut to System.Nullable In order to use System.Nullable, type X must be a non-nullable type, which is not guaranteed when declared as interface IB : IA { } but when declared as interface IB : IA where X : struct { } it should compile. // Ryan On Dec 6, 2007 12:29 PM, Mark Nicholl

Re: [ADVANCED-DOTNET] another generic query....

2007-12-06 Thread Fabian Schmied
> Sorry to bombard with generic questions... > > I've just come across > > interface IA > { > ... > } > > interface IB : IA // yes the '?' is not a typo > { > } As the 'X?' indicates that you want a nullable X, you must ensure that X is a type that can be made nullable: interface IB : IA where

Re: [ADVANCED-DOTNET] another generic query....

2007-12-06 Thread Barry Kelly
Mark Nicholls <[EMAIL PROTECTED]> wrote: > Sorry to bombard with generic questions... > > I've just come across > > interface IA > { > ... > } > > interface IB : IA // yes the '?' is not a typo > { > } > > it does compile...it gives > > The type 'A' must be a non-nullable value type in order

[ADVANCED-DOTNET] another generic query....

2007-12-06 Thread Mark Nicholls
Sorry to bombard with generic questions... I've just come across interface IA { ... } interface IB : IA // yes the '?' is not a typo { } it does compile...it gives The type 'A' must be a non-nullable value type in order to use it as parameter 'T' in the generic type or method 'System.Nullable'

Re: [ADVANCED-DOTNET] generics and Mixins

2007-12-06 Thread Mark Nicholls
I want to add interfaces to classes in code. class FooAnd : Foo,X { } . . . . . void XYZ() { FooAnd fooAndBar = new FooAnd(); } you can almost do it by wrapping X with an interface decorator interface Iam { X GetX(); } class FooAnd : Foo,Iam { } but it's not quite the same. ===

Re: [ADVANCED-DOTNET] Modal dialog boxes...

2007-12-06 Thread Fabian Schmied
> No... The application I'm writing is not multithreaded (there are some areas > where it is, but that is working fine)... Hm, a pity, that would've explained it so nicely :) On the other hand, since you're probably using .NET 2.0, this kind of errors is usually detected by Windows.Forms anyway.

Re: [ADVANCED-DOTNET] Modal dialog boxes...

2007-12-06 Thread Frans Bouma
> On 12/5/07, Frans Bouma <[EMAIL PROTECTED]> wrote: > > > > I've not seen this behavior before, but here are some pointers which might > > help: > > 1) always make the application's main form the PARENT of the modal dialog. > > Don't ever open a modal dialog with the desktop as parent for example.