default keyword confusion

So im learning about generics and ive found out about the default keyword to initialize variables to a default value. Sounded simple enough! However I dont understand this behavior im seeing:

http://ift.tt/1KoWHN2

Theres two methods that do the same thing, they find the minimum value in an array. The difference is line 39 in the getMin2() method where I used the default keyword to initialize the return variable. The output is completely different for that method and I dont understand why 🙁 Anyone care to enlighten me?

by maxp779 via /r/csharp

Leave a Reply