I have
Dictionary<Guid, DateTime> d = new Dictionary<Guid, DateTime>();
How I can get an Guid which has MAX value?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Since this was the accepted answer, I’ll try to cover every possible meaning of the question:
Note: the question has
System.Guidas the key type. It might not make sense to ask "what is the greatest GUID", since they are simply intended to be unique values, rather than represent any orderable concept. Nonetheless, the above code will work with any type that supports the>operator,stringandintbeing chosen here for conciseness.