¡@

Home 

c# Programming Glossary: nullable

What does “DateTime?” mean in C#?

http://stackoverflow.com/questions/109859/what-does-datetime-mean-in-c

startdate What does DateTime mean c# .net datetime syntax nullable share improve this question Since DateTime is a struct not.. not a reference. Adding the question mark turns it into a nullable type which means that either it is a DateTime object or it is..

C# okay with comparing value types to null

http://stackoverflow.com/questions/1972262/c-sharp-okay-with-comparing-value-types-to-null

operator to choose. There is an operator that takes two nullable ints. The int local is convertible to a nullable int. The null.. takes two nullable ints. The int local is convertible to a nullable int. The null literal is convertible to a nullable int. Therefore.. to a nullable int. The null literal is convertible to a nullable int. Therefore this is a legal usage of the operator and will..

What are the correct version numbers for C#?

http://stackoverflow.com/questions/247621/what-are-the-correct-version-numbers-for-c

2005 . Major new features generics anonymous methods nullable types iterator blocks C# 3.0 released with .NET 3.5 and VS2008..

How to check if an object is nullable?

http://stackoverflow.com/questions/374651/how-to-check-if-an-object-is-nullable

to check if an object is nullable How do I check if a given object is nullable in other words.. an object is nullable How do I check if a given object is nullable in other words how to implement the following method... bool.. IsNullableValueType object o ... EDIT I am looking for nullable value types. I didn't have ref types in mind. Note This is just..

Casting vs using the 'as' keyword in the CLR

http://stackoverflow.com/questions/496096/casting-vs-using-the-as-keyword-in-the-clr

we can't use as with TargetType itself but we can use a nullable type TargetType convertedRandomObject randomObject as TargetType.. value type case before now not having thought of using a nullable type and as together EDIT Note that none of the above talks.. the value type case where I've noted that unboxing to a nullable value type is actually slower but consistent. As per naasking's..

Create code first, many to many, with additional fields in association table

http://stackoverflow.com/questions/7050404/create-code-first-many-to-many-with-additional-fields-in-association-table

properties and since the FK properties are of type non nullable int the relationship is required which finally causes the cascading..

Conditional operator assignment with Nullable<value> types?

http://stackoverflow.com/questions/75746/conditional-operator-assignment-with-nullablevalue-types

both types would be valid in an assignment operation to a nullable int on their own. Null coalescing operator is not an option.. know a more elegant solution c# conditional operator nullable share improve this question The problem occurs because the..

Nullable types and the ternary operator: why is `? 10 : null` forbidden? [duplicate]

http://stackoverflow.com/questions/858080/nullable-types-and-the-ternary-operator-why-is-10-null-forbidden

10 to the Nullable int x. Otherwise assign null to the nullable int. However the compiler complains Error 1 Type of conditional.. conversion between int and null . Am I going nuts c# .net nullable conditional operator share improve this question The compiler..

What does “DateTime?” mean in C#?

http://stackoverflow.com/questions/109859/what-does-datetime-mean-in-c

object or it is null . DateTime is syntactic sugar for Nullable DateTime where Nullable is itself a struct . share improve..

Convert IEnumerable to DataTable

http://stackoverflow.com/questions/1253725/convert-ienumerable-to-datatable

propType.GetGenericTypeDefinition .Equals typeof Nullable propType new NullableConverter propType .UnderlyingType table.Columns.Add.. .Equals typeof Nullable propType new NullableConverter propType .UnderlyingType table.Columns.Add prop.Name..

How to check if an object is nullable?

http://stackoverflow.com/questions/374651/how-to-check-if-an-object-is-nullable

words how to implement the following method... bool IsNullableValueType object o ... EDIT I am looking for nullable value types... equal to true . What I really wanted was an object of type Nullable bool So now as a work around I decided to check if o is nullable.. improve this question There are two types of nullable Nullable T and reference type. Jon has corrected me that it is hard to..

Performance Tests of Serializations used by WCF Bindings

http://stackoverflow.com/questions/3790728/performance-tests-of-serializations-used-by-wcf-bindings

long GameID get set public bool GameSetup get set public Nullable int MaximumCardsInDeck get set public Player Player get set.. int Player2Won get set public int Round get set public Nullable int RoundsToWin get set public bool Started get set public string.. bool Started get set public string StateXML get set public Nullable DateTime TimeEnded get set public Nullable int TimeLimitPerTurn..

Conditional operator assignment with Nullable<value> types?

http://stackoverflow.com/questions/75746/conditional-operator-assignment-with-nullablevalue-types

operator assignment with Nullable value types EmployeeNumber string.IsNullOrEmpty employeeNumberTextBox.Text.. myself wanting to do things like this EmployeeNumber is a Nullable int as it's a property on a LINQ to SQL dbml object where the.. be determined there are real reasons it can't just assume Nullable Int32 . If you really want to use it in this way you must cast..

Nullable types and the ternary operator: why is `? 10 : null` forbidden? [duplicate]

http://stackoverflow.com/questions/858080/nullable-types-and-the-ternary-operator-why-is-10-null-forbidden

types and the ternary operator why is ` 10 null` forbidden duplicate.. has an answer here Conditional operator assignment with Nullable value types 4 answers Why doesn't this C# code compile.. 10 null Simple if the method returns true assign 10 to the Nullable int x. Otherwise assign null to the nullable int. However the..