?
Solved

Enum question

Posted on 2007-04-11
2
Medium Priority
?
173 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

752 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