WCF visual basic Operation Contract Json Attributes ? RRS feed

  • Question

  • <OperationContract()>
             <WebInvoke(Method   :=   "Get",
                         ResponseFormat   :=  WebMessageFormat.Json,
                BodyStyle    :=    WebMessageBodyStyle.Wrapped,
                UriTemplate   :=   "GetDataJSON")> _
        Function GetData(ByVal value As Integer) As String

    in visual basic ":=" just like c# only have "="? am i right?

    Friday, August 1, 2014 10:06 AM


  • Hi,

    In this question if we convert the above the code to the C#, it will be as following:

    	[WebInvoke(Method = "Get", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "GetDataJSON")]
    	string GetData(int value);

    Then from the convertion it seems that ":=" just like c# "=" .

    But if I have used the following in C#:
    int i;
    Then in, it will be:
    Dim i As Integer
    i = 1
    Dim i As Integer
    i := 1

    So in my mind, both of  them are different.

    If you have any other question about the VB, then it will be better for you to post it in the VB forum:
    #VB forum: .

    Thanks for your understanding.

    Best Regards,
    Amy Peng

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, August 4, 2014 2:54 AM