none
VB.net Code got from C# converter RRS feed

  • Question

  • Hi all

    i have converted in vb.net the following code from a c# project

     Public Function SetGroupOn(ByVal Name As String) As Boolean
                If String.IsNullOrEmpty(Name) Then Return RemoveGrouping()
                Return CheckSource().SetGroupOn(Name)
            End Function
    
     Private Function CheckSource() As GroupingSource
                If grid Is Nothing Then Throw New Exception("No target datagridview set")
    
                If Not GridUsesGroupSource Then
                    source.DataSource = grid.DataSource
                    source.DataMember = grid.DataMember
                    grid.DataSource = source
                End If
    
                Return source
            End Function


    I do not really understand the following statment

     Return CheckSource().SetGroupOn(Name)

    One More thing

    What the following code means

    Public Function SetGroupOn(ByVal col As DataGridViewColumn) As Boolean
                Return SetGroupOn(If(col Is Nothing, Nothing, col.DataPropertyName))
    
            End Function

    What does  the function Return ?




    • Edited by Claudio111 Friday, August 31, 2018 4:21 PM
    Friday, August 31, 2018 2:18 PM

Answers

  • Hi,

    I think you still need to provide complete C# or vb.net code.

    Best Regards,

    Alex


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Claudio111 Monday, September 3, 2018 4:40 PM
    Monday, September 3, 2018 8:03 AM

All replies

  • What was the original C# code?  How did you convert it?
    Sunday, September 2, 2018 6:38 AM
  • Hi,

    I think you still need to provide complete C# or vb.net code.

    Best Regards,

    Alex


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Claudio111 Monday, September 3, 2018 4:40 PM
    Monday, September 3, 2018 8:03 AM
  • I have the same question onpen with you with the C# code

    Thanks

    Monday, September 3, 2018 4:40 PM
  • How in the world can your reply be the checked answer when all you did was repeat the same question I asked a day earlier?
    Monday, September 3, 2018 7:33 PM