Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

630
Vistas
Question Mark (?) after session variable reference - What does that mean

I have had a code snippet comes to modify. In there i found this such syntax.

Session("LightBoxID")?.ToString()

I didn't understand what is that Question mark (?) there means. No googling helped me about any hint

about 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

It's the Null-Conditional Operator It's a syntactic sugar for null checking:

return str?.ToString();

will become

if (str == null)
{
    return null;
}
return str.ToString();
about 4 years ago · Santiago Trujillo Denunciar

0

It performs a null-check on Session("LightBoxID") before attempting to call .ToString() on it.

MS Docs: Null-conditional operators ?. and ?[]

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda