Click here to Skip to main content
15,914,111 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: DataGridView Parent/Child Pin
AliAmjad24-Oct-07 5:26
AliAmjad24-Oct-07 5:26 
GeneralRe: DataGridView Parent/Child Pin
alwinSCH24-Oct-07 6:21
alwinSCH24-Oct-07 6:21 
AnswerRe: DataGridView Parent/Child Pin
Dave Kreskowiak24-Oct-07 6:33
mveDave Kreskowiak24-Oct-07 6:33 
GeneralRe: DataGridView Parent/Child Pin
alwinSCH25-Oct-07 3:04
alwinSCH25-Oct-07 3:04 
GeneralRe: DataGridView Parent/Child Pin
Dave Kreskowiak25-Oct-07 3:20
mveDave Kreskowiak25-Oct-07 3:20 
GeneralRe: DataGridView Parent/Child Pin
darkelv25-Oct-07 17:39
darkelv25-Oct-07 17:39 
GeneralRe: DataGridView Parent/Child Pin
alwinSCH25-Oct-07 20:56
alwinSCH25-Oct-07 20:56 
QuestionTry Catch inside of functions Pin
barney_197224-Oct-07 3:28
barney_197224-Oct-07 3:28 
Some help on good practice would be appreciated.

I have the following function and similar functions, but often get a squigly line
somewhere in the functions which tells me the function does not return a value on all paths.

Public Function ConvertToXmlDocument() As XmlDocument
'Alter the return type to suit - either stream or file or other

Dim FileLineString As String
Dim LineNumberInteger As Int32
Dim XmlSequenceCount As Int32

'Create xml envelope
Dim XmlOutputDocument As New Xml.XmlDocument

Try

'Intialise Xml Document
If InitialiseXmlDocument(XmlOutputDocument, "Flat file" Then


'Loop array / reading each line of file content
For Each FileLineString In Me.FileContentString

'Line count
LineNumberInteger += 1

'Retrieve xml node.......

'Unformat retrieved node against file line....
Next

Return XmlOutputDocument


End If

Catch ex As Exception
Return Nothing

End Try

End Function

Should i use multiple returns (ie another return statement after the end try) or is their a much better way in general, not just specific to this function?

Many Thanks

AnswerRe: Try Catch inside of functions Pin
Tamimi - Code24-Oct-07 3:48
Tamimi - Code24-Oct-07 3:48 
AnswerRe: Try Catch inside of functions Pin
SHatchard24-Oct-07 3:52
SHatchard24-Oct-07 3:52 
AnswerRe: Try Catch inside of functions Pin
barney_197224-Oct-07 4:16
barney_197224-Oct-07 4:16 
AnswerRe: Try Catch inside of functions Pin
Dave Kreskowiak24-Oct-07 6:29
mveDave Kreskowiak24-Oct-07 6:29 
Questionhow to make my code send an email Pin
Knowledgestudent24-Oct-07 3:26
Knowledgestudent24-Oct-07 3:26 
AnswerRe: how to make my code send an email Pin
Tom Deketelaere24-Oct-07 4:44
professionalTom Deketelaere24-Oct-07 4:44 
GeneralRe: how to make my code send an email Pin
Dave Kreskowiak24-Oct-07 6:25
mveDave Kreskowiak24-Oct-07 6:25 
GeneralRe: how to make my code send an email [modified] Pin
Tom Deketelaere24-Oct-07 21:19
professionalTom Deketelaere24-Oct-07 21:19 
GeneralRe: how to make my code send an email Pin
Dave Kreskowiak25-Oct-07 1:48
mveDave Kreskowiak25-Oct-07 1:48 
GeneralRe: how to make my code send an email Pin
Tom Deketelaere25-Oct-07 2:33
professionalTom Deketelaere25-Oct-07 2:33 
GeneralRe: how to make my code send an email Pin
Knowledgestudent25-Oct-07 2:57
Knowledgestudent25-Oct-07 2:57 
Questionhow to create and use class Pin
Knowledgestudent24-Oct-07 3:03
Knowledgestudent24-Oct-07 3:03 
AnswerRe: how to create and use class Pin
Dave Kreskowiak24-Oct-07 6:22
mveDave Kreskowiak24-Oct-07 6:22 
QuestionHow to use Enter key to Select an Option without using a Mouse Pin
Vimalsoft(Pty) Ltd24-Oct-07 2:56
professionalVimalsoft(Pty) Ltd24-Oct-07 2:56 
AnswerRe: How to use Enter key to Select an Option without using a Mouse Pin
The ANZAC24-Oct-07 2:59
The ANZAC24-Oct-07 2:59 
GeneralRe: How to use Enter key to Select an Option without using a Mouse Pin
Vimalsoft(Pty) Ltd24-Oct-07 3:22
professionalVimalsoft(Pty) Ltd24-Oct-07 3:22 
GeneralRe: How to use Enter key to Select an Option without using a Mouse Pin
The ANZAC24-Oct-07 3:25
The ANZAC24-Oct-07 3:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.