Pular para o conteúdo principal

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:
  1. APublic Shared Class MyExtensionPublic Shared Function Quoted(this ByVal helper As HtmlHelper,ByVal text As String) As StringReturn """" & text & """"End FunctionEnd Class
  2. BPublic Module MyExtensionPublic Function Quoted(ByVal helper As HtmlHelper,ByVal text As String) As StringReturn """" & text & """"End FunctionEnd Module
  3. 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
  4. DImports System.Runtime.CompilerServicesPublic Module MyExtension<Extension()>Public Function Quoted(ByVal helper As HtmlHelper,ByVal text As String) As StringReturn """" & text & """"End FunctionEnd Module
  5. 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
Revelar gabarito e comentário

GabaritoD — Imports System.Runtime.CompilerServices Public Module MyExtension <Extension()> Public Function Quoted( ByVal helper As HtmlHelper, ByVal text As String ) As String Return """" & text & """" End Function End Module

Link permanente: /questoes/vu078912