N
Nathan Sokalski
I am trying to use the System.Array.ForEach method in VB.NET. The action
that I want to perform on each of the Array values is:
Private Function AddQuotes(ByVal value As String) As String
Return String.Format("'{0}'", value)
End Function
Basically, I just want to surround each value with single quotes. However, I
am having trouble getting this to work using the System.Array.ForEach
method. This may be partially because I am not very experienced with Actions
or Delegates, so if somebody could tell me what I am doing wrong, I would
appreciate it. Thanks. (NOTE: The Array that I want to modify the values of
is not one that I have permission to modify (it is
System.Globalization.DateTimeFormatInfo.CurrentInfo.DayNames()), so if
anybody knows of a way to do this inline without declaring another Array,
that would be nice as well)
that I want to perform on each of the Array values is:
Private Function AddQuotes(ByVal value As String) As String
Return String.Format("'{0}'", value)
End Function
Basically, I just want to surround each value with single quotes. However, I
am having trouble getting this to work using the System.Array.ForEach
method. This may be partially because I am not very experienced with Actions
or Delegates, so if somebody could tell me what I am doing wrong, I would
appreciate it. Thanks. (NOTE: The Array that I want to modify the values of
is not one that I have permission to modify (it is
System.Globalization.DateTimeFormatInfo.CurrentInfo.DayNames()), so if
anybody knows of a way to do this inline without declaring another Array,
that would be nice as well)