IDisposable Question

前端 未结 8 1711
野的像风
野的像风 2021-01-11 18:35

Say I have the following:

public abstract class ControlLimitBase : IDisposable 
{
}

public abstract class UpperAlarmLimit : ControlLimitBase 
{
}

public cl         


        
8条回答
  •  日久生厌
    2021-01-11 19:20

    The best practice recommend when you implement Dispose() method in non sealed class you should have a virtual method for your derived classes to override.

    Read more on Dispose pattern here http://www.codeproject.com/KB/cs/idisposable.aspx

提交回复
热议问题