Firstly, sorry if I don't know the right question to ask but I've tried various google, Code Project and MSDN searches on this one.
I have been learning VB.Net (VS2010) and have come across a couple of walk-throughs that show very different ways of constructing Properties of various Classes. Indeed in this one walk-through the author uses two approaches to class construction without obvious explanation.
http://msdn.microsoft.com/en-AU/library/ms171892%28v=vs.100%29.aspx[
^]
That is for the "Customer" class he uses only strings:
Public Sub New(ByVal customerId As String,
ByVal companyName As String,
ByVal phone As String,
ByVal fax As String)
customerIDValue = customerId
phoneValue = phone
faxValue = fax
End Sub
For the "Order" Class he uses the actual variable type that reflects the database fields:
Public Sub New(ByVal orderid As Integer,
ByVal customerID As String,
shipCountryValue = shipCountry
End Sub
I can see that genericising the construction like that could save some hassles with, for example, dates. However, can someone help explain why you would use one approach over another.
Even guidance on how to frame a google/ MSDN search on the topic would be appreciated.