Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 1428 doesn't recognize nullable types in C#
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

partnerinflight
Senior Member

37 Posts

Posted - Oct 27 2005 :  4:39:35 PM  Show Profile  Reply with Quote
Variables declared as nullable types are colored red.

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Oct 27 2005 :  6:57:26 PM  Show Profile  Reply with Quote
i don't recognise the concept of a nullable type. can you post a short code snippet to show me what you are doing? which IDE are you using? is this something new in C# 2?

zen is the art of being at one with the two'ness
Go to Top of Page

partnerinflight
Senior Member

37 Posts

Posted - Nov 07 2005 :  1:07:04 PM  Show Profile  Reply with Quote
Yup, it's a new concept in C# 2.0. To define an int, say, that can have the value of null you define it like this:

int? i = 5;
int? j = null;

so on. There are two operators to keep in mind: the nullable -- ? -- operaton, and the null coalescing operator -- ?? -- where

int j = i == null ? 5 : i;

is expressed as

int j = i ?? 5;

where i is a nullable int. There are some good codeproject articles on nullable types; might want to check them out.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Nov 07 2005 :  4:51:09 PM  Show Profile  Reply with Quote
when you say they are coloured red, if you mean that VA is underlining them with a red line to indicate a mistyped symbol then i am getting the same thing.

case=867

i have dabbled with C# in VS 2003 but have yet to look at C# in VS 2005. i will one of these days, i am sure

zen is the art of being at one with the two'ness
Go to Top of Page

Christopher Holt
Ketchup Master

USA
70 Posts

Posted - Nov 29 2005 :  10:56:22 AM  Show Profile  Reply with Quote
This is still broken in the general release. I was wondering if there is a plan to fix this anytime soon?

Thanks.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Nov 29 2005 :  4:27:06 PM  Show Profile  Reply with Quote
sorry, but no progress to report on this yet. there are quite a lot of outstanding bugs to address, so it is a case of working through them.

this thread should be updated when a fix is released.

zen is the art of being at one with the two'ness
Go to Top of Page

Christopher Holt
Ketchup Master

USA
70 Posts

Posted - Nov 29 2005 :  4:34:57 PM  Show Profile  Reply with Quote
Thanks feline.
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Apr 14 2006 :  1:16:05 PM  Show Profile  Reply with Quote
Fixed in build 1445.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000