Click here to Skip to main content
15,902,777 members
Home / Discussions / C#
   

C#

 
AnswerRe: Take Picture using Digital Camera in C# Pin
led mike20-Jun-07 10:01
led mike20-Jun-07 10:01 
AnswerRe: Take Picture using Digital Camera in C# Pin
Christian Graus20-Jun-07 12:05
protectorChristian Graus20-Jun-07 12:05 
QuestionDataGridViewComboBoxColumn Values Pin
~~~Johnny~~~20-Jun-07 9:07
~~~Johnny~~~20-Jun-07 9:07 
AnswerRe: DataGridViewComboBoxColumn Values Pin
~~~Johnny~~~20-Jun-07 12:38
~~~Johnny~~~20-Jun-07 12:38 
Questiontable like excel Pin
daniel9920-Jun-07 6:53
daniel9920-Jun-07 6:53 
AnswerRe: table like excel Pin
joe carbone20-Jun-07 7:46
joe carbone20-Jun-07 7:46 
QuestionHelp with random numbers Pin
amatbrewer20-Jun-07 6:16
amatbrewer20-Jun-07 6:16 
AnswerRe: Help with random numbers Pin
led mike20-Jun-07 6:25
led mike20-Jun-07 6:25 
GeneralRe: Help with random numbers Pin
amatbrewer20-Jun-07 6:28
amatbrewer20-Jun-07 6:28 
GeneralRe: Help with random numbers Pin
Luc Pattyn20-Jun-07 6:34
sitebuilderLuc Pattyn20-Jun-07 6:34 
GeneralRe: Help with random numbers Pin
led mike20-Jun-07 6:37
led mike20-Jun-07 6:37 
GeneralRe: Help with random numbers Pin
amatbrewer20-Jun-07 6:38
amatbrewer20-Jun-07 6:38 
AnswerRe: Help with random numbers Pin
Thomas Stockwell20-Jun-07 12:56
professionalThomas Stockwell20-Jun-07 12:56 
QuestionDefault value selected in Combo Box after another form closes. Pin
bhoomi kakaiya20-Jun-07 5:45
bhoomi kakaiya20-Jun-07 5:45 
AnswerRe: Default value selected in Combo Box after another form closes. Pin
~~~Johnny~~~20-Jun-07 12:37
~~~Johnny~~~20-Jun-07 12:37 
GeneralRe: Default value selected in Combo Box after another form closes. Pin
atulonweb@hotmail.com20-Jun-07 21:27
atulonweb@hotmail.com20-Jun-07 21:27 
GeneralRe: Default value selected in Combo Box after another form closes. Pin
bhoomi kakaiya21-Jun-07 4:27
bhoomi kakaiya21-Jun-07 4:27 
AnswerRe: Default value selected in Combo Box after another form closes. Pin
atulonweb@hotmail.com20-Jun-07 21:31
atulonweb@hotmail.com20-Jun-07 21:31 
GeneralRe: Default value selected in Combo Box after another form closes. Pin
bhoomi kakaiya21-Jun-07 4:24
bhoomi kakaiya21-Jun-07 4:24 
GeneralRe: Default value selected in Combo Box after another form closes. Pin
~~~Johnny~~~21-Jun-07 6:20
~~~Johnny~~~21-Jun-07 6:20 
Questioncode to store the original array index of the sorted array Pin
Arun Raj.K20-Jun-07 5:43
Arun Raj.K20-Jun-07 5:43 
QuestionDataSet does not support System.Nullable Pin
Brady Kelly20-Jun-07 5:25
Brady Kelly20-Jun-07 5:25 
AnswerRe: DataSet does not support System.Nullable PinPopular
Lisa Jorgensen20-Jun-07 7:29
Lisa Jorgensen20-Jun-07 7:29 
GeneralRe: DataSet does not support System.Nullable Pin
Brady Kelly20-Jun-07 7:47
Brady Kelly20-Jun-07 7:47 
SuggestionRe: DataSet does not support System.Nullable Pin
WiiMaxx24-Apr-14 1:29
WiiMaxx24-Apr-14 1:29 
instead of your

C#
if (propType.IsGenericType &&
    propType.GetGenericTypeDefinition() == typeof(Nullable<>))
    {
        propType = Nullable.GetUnderlyingType(propType);
    }


you could also do

C#
column.DataType = Nullable.GetUnderlyingType(PropertyType) ?? PropertyType;


depending on your knowledge about the ?? operator and your preferences it could improve the readability

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.