Custom Code not showing up

  • I have a simple custom code function (even copied from MSDN site) it will not show up in the Expression window, as in Code.MyFunction.

    Intellisense only shows Code.Equals , .GetHashCode, .GetType, .ReferenceEquals and .Tostring

    Why is my function not available as described in all the text books and examples?

    Public Function MyFunction(ByVal s AS String) AS String

    Dim strBuilder As New System.Text.StringBuilder(s)

    If s.Contains("Bike") Then

    strBuilder.Replace("Bike", "Bicycle")

    Return strBuilder.ToString()

    Else : Return s

    End If

    End Function

  • Hi Tima,

    Regards to you...:)

    You are absolutely correct saying..that the functions "MyFunction" (Custom function)....is never shown as Code.MyFunction...in Expression window...

    Well...I would like to say that even though it is invisible..means..not shown in the expression window..we can still use it like Code.MyFunction...it may underline it in red...but still the function will work..as per the code...inside...So...don't worry abt it...we can use it neways...(If u come across the reason why its not being shown over there ...then pls let me knw..too)...

    Thanks,

    Niraj

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply