Inner Type Name Does Not Match File Name

Thread is closed for posting
2 posts, 0 answers
  1. bradhh
    bradhh avatar
    25 posts
    Member since:
    Feb 2007

    Posted 07 Jan 2013 Link to this post

    I am receiving a warning on my delegate methods:

       VB.NET: Inner type name does not match file name

    Perhaps best-practices suggest that I am not placing the delegate method in the correct assembly, but I cannot find any good guidance on this matter. My code looks like this:

    Public Class Test
      Public Delegate Function MyDelegate(ByVal value As String) As Boolean
      Public Function DoIt(ByVal value As String, ByVal method As MyDelegate) As Boolean
        Return method(value)
      End Function
    End Class

    Is there a better way for me to handle declaring delegate functions? Or is the warning just not necessary?

    Thanks -

    Brad Harris
  2. Zdravko
    Zdravko avatar
    657 posts

    Posted 10 Jan 2013 Link to this post


     Thanks for contacting us.
    In order to fix this warning you could move the delegate to a new file named like the delegate name.
    Furthermore, you can disable this kind of warning from JustCode menu > Options > Code Analysis > Warnings > VB.NET. Find and disable there "Inner types not matching file name".

    All the best,
    the Telerik team
    Share what you think about JustCode with us, so we can help you even better! You can use the built-in feedback tool inside JustCode, our forum, or our JustCode feedback portal.
Back to Top