扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:朱先忠编译 来源:天极开发 2007年11月3日
关键字:
![]() 图2:当前可用的重构和动作提示,提取方法 |
Imports System.ServiceProcess Public Class WillRefactor Private HeartRate As Integer Public Property HeartRate1() As Integer Get Return HeartRate End Get Set(ByVal value As Integer) HeartRate = value End Set End Property Public Sub PseudoLongMethod() ' a bunch of code BunchOfCode() End Sub Private Sub BunchOfCode() Dim I As Integer For I = 1 To 100 Console.WriteLine(HeartRate) Next End Sub End Class |
Private Sub BunchOfCode(ByVal count As Integer) Dim I As Integer For I = 1 To count Console.WriteLine(HeartRate) Next End Sub |
Private Sub BunchOfCode(ByVal count As Integer) Dim I As Integer For I = 1 To count Console.WriteLine(HeartRate) Next End Sub Private Sub BunchOfCode() Dim lCount As Integer = 0 BunchOfCode(lCount) End Sub |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。