c# - what datatype to use to store "MMYYYY" format -


i using .net environment , wanted track expiration date found in credit cards. date there of nature "mmyyyy". recommended way store ? should use .net string or instead use .net datetime object ?

in cases easiest solution best solution. easy maintain, easy other programmers recognize, , may keep out of trouble (ints , strings can lead localization problems , invalid values).

a system.datetime best option , gives flexibility cards may expire on given day (they rare, exist, , may become more prevalent temporary credit cards becoming popular). when storing value use date property of system.datetime struct since disregard time components.


Comments

Popular posts from this blog

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -