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
> 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,
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
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
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,
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
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
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
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
> 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
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
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'
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.
===
> 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.
> 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.
15 matches
Mail list logo