單項(xiàng)選擇題

你正在創(chuàng)建一個(gè)自定義服務(wù)器控件,并且你需要此控件支持在Visual Studio 2005設(shè)計(jì)器中使用。為此,你創(chuàng)建了兩個(gè)類:一個(gè)是從Composite Control繼承的myControl類,另一個(gè)是從Composite ControlDesigner繼承的myControlDesigner類。你需要把myControl和myControlDesigner進(jìn)行關(guān)聯(lián)。下面那一個(gè)可以正確達(dá)到此目的?()

A.[Designer(myControlDesigner)] public class myControl: CompositeControl
B.[Designer(typeof(myControl))] public class myControlDesigner: CompositeControlDesigner
C.[Designer(myControl)] public class myControlDesigner: CompositeControlDesigner
D.[Designer(typeof(myControlDesigner))] public class myControl: CompositeControl

微信掃碼免費(fèi)搜題