c# - What is this line of code asking? -


    public schedule schedule     {                 {             return (contractconsignee == null ? null : contractconsignee.schedule);         }         set         {             if (contractconsignee == null)             {                 contractconsignee = new contractconsignee(session);                 contractconsignee.assignments.add(this);             }             contractconsignee.schedule = value;         }     } 

someone else wrote code. trying solve bug in our system. i'm not familiar with:

 == null ? null : contractconsignee.schedule 

? : conditional operator.

if contractconsignee null, getter returns null; otherwise, return contractconsignee.schedule.


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -