T
TS
Hi, I had a microsoft guru help my team build a project. I noticed that in 2
situations where a value needed to be formatted in a certain way when viewed
in browser, he would create a new class called "format_nameFormatInfo".
He used 2 functions in each:
Public Function GetFormat(ByVal formatType As System.Type) As Object
Implements System.IFormatProvider.GetFormat
and
Public Function Format(ByVal formatString As String, ByVal argToBeFormatted
As Object, ByVal formatProvider As System.IFormatProvider) As String
Implements System.ICustomFormatter.Format
I'm wondering if this is a common practice for all OO gurus. The reason I
ask is I have to do the same thing in other parts of the app, and also
becuase I just want to know the preferred way to doing things.
Thanks.
situations where a value needed to be formatted in a certain way when viewed
in browser, he would create a new class called "format_nameFormatInfo".
He used 2 functions in each:
Public Function GetFormat(ByVal formatType As System.Type) As Object
Implements System.IFormatProvider.GetFormat
and
Public Function Format(ByVal formatString As String, ByVal argToBeFormatted
As Object, ByVal formatProvider As System.IFormatProvider) As String
Implements System.ICustomFormatter.Format
I'm wondering if this is a common practice for all OO gurus. The reason I
ask is I have to do the same thing in other parts of the app, and also
becuase I just want to know the preferred way to doing things.
Thanks.