Generics

by Lord Cod3n 27. August 2008 05:14

I switched tasks again.  I love adhd and I am trying to do some work for one of my clients.  I am writing a piece of code that pulls and validates information from an excel file.  I am given a lot of freedom in the implementation.  The only constraint is I have to use visual studio 2005.  I wrote a function to convert integers.  I wrote a function to covert Doubles.  I wrote a function to convert Strings.  So on and so forth.  I have been working with generics a bit.  All my previous jobs did not present me with the opportunity to dig deep.  What I am trying to accomplish is below: 

If you know of a solution let me know.  I will post up if I find anything. 

Private Sub ConvertFromString(Of T)(ByRef conversion As T, ByRef cell As String)

T.TryParse(getItem(cell), conversion)

End Sub

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

William Moore is the lead Software Architect and Technologist for Coden Enterprises. He has more than a decade of software development experience primarily Microsoft Platforms.  William enjoys the full gamit of coding everything from the UI down to the database.

Most comments

Page List