Simple question

  • Thread starter Thread starter JohnnyGr
  • Start date Start date
J

JohnnyGr

How do i do this in a better(?) way...


Private Function cGetValue(ByVal value As Integer) As String
Select Case value
Case 1 : Return "Baseline"
Case 14 : Return "Lossless"
Case Else : Return "Unknown"
End Select
End Function


is there something that is more "standard" or does that look OK?

Thanks
Johnny
 
JohnnyGr said:
How do i do this in a better(?) way...

Private Function cGetValue(ByVal value As Integer) As String
Select Case value
Case 1 : Return "Baseline"
Case 14 : Return "Lossless"
Case Else : Return "Unknown"
End Select
End Function

is there something that is more "standard" or does that look OK?

Looks okay, IMO. You could use an enumeration type instead of 'Integer',
depending on the case.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top