This is my code block
XY = xyList.[Select](Function(o) New XY() With {.y = New y() With {.xId = o.x.Id _
, .xName = o.x.xName} _
, .Stopped = o.Stopped _
, .PNumber = o.PNumber _
, .yId = o.yId _
, .yName = o.yName _
'need to add some comment here '
, .Allocated = o.Allocated _
, .TotalNo = o.TotalNo _
}).ToList()
But wnen I tried with ' its having compilation issues.
I need to put some comments in between the propeties hwew
Thanks
Simple answer: you can’t
Longer answer: It is not valid VB.NET code to have a comment in a multiple-line code block as you’re wanting.
If it was C / C++ / C# (or a variant on) then you could use the
/*...*/style comments – but these are not available in VB.NET(Minor update to remove the phrase “at the start of the line”… as it implies that you can have it at the end of the line. Again, you can’t)