C
C#2w ago
Jexs

Culture.invariant

Invariant culture is only used to keep visual studios from choosing the current date and time on the computer that and THATS THE ONLY FUNCTION OF IT Like in this example cs Datetime Today = DateTime.ParseExact(“6/12/1999”,”m/d/yyyy”, cultureinfo.invariantculture); ‘’’ Is there any other use ? Sorry about the displayed code I’m on iPhone idk what symbol highlights the code ! sorry for cross posting
4 Replies
Jimmacle
Jimmacle2w ago
it has nothing to do with VS, time zones, or the local computer time cultures are a set of rules around how to handle region specific formatting and calculations like numbers, dates, calendars, etc. like how some places like the US format numbers as 1,234.567 and others format them as 1.234,567
Petris
Petris2w ago
here it's 1<nbsp>234,567 or 1234,567 too (yes it's specifically nbsp only according to the standard)
Jexs
JexsOP2d ago
sorry jim for the double post im still kinda lost on it e.o im going to re read the chat
Jimmacle
Jimmacle2d ago
what are you trying to use it for?

Did you find this page helpful?