Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

VS 2012 [RESOLVED] Replacing a String with Nothing

$
0
0
Here is a string that I have:

Code:

    Public Sub SaveDreamScriptListToFile(stringFileName As String, DreamScriptList As List(Of DreamScript))
        SerializationClassLibraryObject.SerializeDESObjectToFile(stringFileName, DreamScriptList)
    End Sub

    Public Sub SaveSoundListToFile(stringFileName As String, SoundList As List(Of Sound))
        SerializationClassLibraryObject.SerializeDESObjectToFile(stringFileName, SoundList)
    End Sub

    Public Sub SaveScheduleListListToFile(stringFileName As String, ScheduleListList As List(Of ScheduleList))
        SerializationClassLibraryObject.SerializeDESObjectToFile(stringFileName, ScheduleListList)
    End Sub

    Public Sub SaveScheduleListItemListToFile(stringFileName As String, ScheduleListItemList As List(Of ScheduleListItem))
        SerializationClassLibraryObject.SerializeDESObjectToFile(stringFileName, ScheduleListItemList)
    End Sub

If I would like to remove one of the sub sections of code, what is the best way? I know that I can use a Replace method call with an empty string, however, this leaves a couple of empty lines. I have also tried using the Nothing value as the string to replace and this does the same thing.

What is the best way to completely remove a string?

Viewing all articles
Browse latest Browse all 27554

Trending Articles