Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Enum question

Posted on 2007-04-11
2
Medium Priority
?
174 Views
Last Modified: 2010-04-15
I don't understand what these 2 lines are doing:

    private SortColumns? _SortColumn;
    private SortDirection? _SortDirection;

if I have this in the page:

    private enum SortColumns
    {
        Title,
        Name
    }

    private enum SortDirection
    {
        Ascending,
        Descending
    }
0
Comment
Question by:dba123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 10

Accepted Solution

by:
ksaul earned 500 total points
ID: 18892641
the ? is a short cut syntax for System.Nullable<type>

http://msdn2.microsoft.com/en-us/library/2cf62fcy.aspx
0
 
LVL 10

Expert Comment

by:ksaul
ID: 18892810
private SortColumns? _SortColumn;
_SortColumn = null; //OK

vs

private SortColumns _SortColumn;
_SortColumn = null; //Compile error
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question