Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-222913: Funny behavior of Initialize field from parameter (VB)

$
0
0
Reporter Egor Malyshev (megor) Egor Malyshev (megor)
Created Mar 3, 2011 2:45:16 PM
Updated Jan 23, 2012 11:10:18 PM
Resolved Jan 23, 2012 7:18:27 PM
Priority Normal
Type Bug
Fix versions 6.1
State Fixed
Assignee Alexey Kuptsov (alexey.kuptsov)
Subsystem No subsystem
Affected versions No Affected versions
Fixed in build 6.5.1.3201
Say I have this constructor:
Public Sub New(ByVal shadowWhat As ToolStripMenuItem, ByVal shadowWhere As ContextMenuStrip)

Using Initialize field intention on its parameters creates fields (withevents modifier added later manually.)
Private WithEvents ShadowWhere As ContextMenuStrip
Private WithEvents ShadowWhat As ToolStripMenuItem

Well guess now what. In C#, they'd be different because of case, not in VB they won't :) Oops, They're not assigned in constructor and I'm screwed.
Public Sub New(ByVal shadowWhat As ToolStripMenuItem, ByVal shadowWhere As ContextMenuStrip)
        shadowWhere = shadowWhere
        shadowWhat = shadowWhat
End Sub

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>