Questão de Programação — ASP — VUNESP 2023
ProgramaçãoASP
- Código
- vu078912
- Banca
- VUNESP
- Órgão
- TCM-SP
- Ano
- 2023
- Nível
- Superior
- Cargo
- Auditor de Controle Externo - Especialidade: Tecnologia da Informação
No ASP.NET MVC 5, para que um auxiliar de HTML personalizado (Custom HTML Helper) possa ser invocado como @Html.Quoted("texto"), ele deve ser declarado como:
- APublic Shared Class MyExtensionPublic Shared Function Quoted(this ByVal helper As HtmlHelper,ByVal text As String) As StringReturn """" & text & """"End FunctionEnd Class
- BPublic Module MyExtensionPublic Function Quoted(ByVal helper As HtmlHelper,ByVal text As String) As StringReturn """" & text & """"End FunctionEnd Module
- CImports System.Runtime.CompilerServicesPublic Module MyExtension<Extension()>Public Shared Function Quoted(this helper As HtmlHelper,ByVal text As String) As StringReturn """" & text & """"End FunctionEnd Module
- DImports System.Runtime.CompilerServicesPublic Module MyExtension<Extension()>Public Function Quoted(ByVal helper As HtmlHelper,ByVal text As String) As StringReturn """" & text & """"End FunctionEnd Module
- EImports System.Runtime.CompilerServicesPublic Class MyExtension<Extension()>Public Shared Function Quoted(ByVal helper As HtmlHelper,ByVal text As String) As StringReturn """" & text & """"End FunctionEnd Class