13

Not work, but was very pissed off anyways.

So, today my C# lecturer was teaching about escape sequences in strings. Specifically, he's showing how to escape the single quotes character ( ' ) since we're learning about how to send SQL queries as well.
He started writing on the whiteboard the following and said that this was how to escape the single quotes character in a string:
\' "abc123" \'
Me and one of my classmates looked at this and started to ask questions, since this is definitely not how you do it. Somehow, the lecturer could not understand us. We tried to explain it the best we could, starting from verbally, then writing on the whiteboard, then even showing code on a laptop. For some unknown reason the lecturer still couldn't understand where he was wrong and both of us just gave up after 15 minutes of trying to explain it.
Mind you, most of the class had little to none prior programming experience, me and said classmate are one of the few that actually programmed before, so all my other classmates were just very confused as to what is right and what is wrong.
Now I'm really questioning my lecturer's abilities....

Comments
  • 0
    Escaping a single quote in a string? What did I just read 😑
  • 0
    Admittdly I learned this (with PHP) like a couple months ago. Despite the fact that I've been programming for about 3 years now. Makes me really question what I'm doing sometimes.
  • 0
    Nice, now everybody thinks that crap is right.

    So when you write a test about it, do you need to write bad shit to score full points?
  • 1
    How does this even works? Does it evaluate to '"string"' before function call?
  • 0
    That just plain wrong and would be like assigning a string to a char and not “\’string\’” which is what he should of wrote if he wasn’t such a dipshit and listened to you
Add Comment