This is a migrated thread and some comments may be shown as answers.

Inner Type Name Does Not Match File Name

1 Answer 59 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
bradhh
Top achievements
Rank 2
bradhh asked on 07 Jan 2013, 08:51 PM
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

1 Answer, 1 is accepted

Sort by
0
Zdravko
Telerik team
answered on 10 Jan 2013, 08:41 PM
Hi,

 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".
Thanks.

All the best,
Zdravko
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.
Tags
General Discussions
Asked by
bradhh
Top achievements
Rank 2
Answers by
Zdravko
Telerik team
Share this question
or