A Quick Lesson On How To Waste 10 Minutes ...
If you have a new puppy, and it pees in the corner of the room, the recommended thing to do is get a fresh newspaper, roll it up tightly, raise it high in air, annnnnd.... bring it down sharply on *your own head*, repeating the mantra "I should've watched puppy more carefully...." ten times... then clean up the pee....
I was putting together a Windows form in C#/VS and after dropping on a ListView
, proceeded to add some columns and give them titles. One of the columns was for "Customer name", but space was tight so I decided to make the title "Name" ... and that's where the trouble started. You see I didn't give the title property the value "Name
", **by mistake** I gave the *NAME*
property the value "Name
" ... and continued to build out the interface. A while later, when I started to add code and build, but of course it failed. Naturally, the error message I got was not especially helpful so much head scratching and digging ensued.
When I clicked the error, I don't see the entire picture...
That only jumps out at me when I started back tracking what I changed to see what happened...
Conclusion
Lesson (re-learned): Don't use reserved words when naming objects or controls, it's bad, and it will bite you. Whenever something goes wrong, look for the simplest solution first, then dig deeper. Remember, compilers are very good at doing what we tell them, so when you get build errors, the first thing to look at is what you have written, chances are you've done a sprinkle in a corner somewhere.
Allen is CTO of SocialVoice (https://www.socialvoice.ai), where his company analyses video data at scale and gives Global Brands Knowledge, Insights and Actions never seen before! Allen is a chartered engineer, a Fellow of the British Computing Society, a Microsoft mvp and Regional Director, and C-Sharp Corner Community Adviser and MVP. His core technology interests are BigData, IoT and Machine Learning.
When not chained to his desk he can be found fixing broken things, playing music very badly or trying to shape things out of wood. He currently completing a PhD in AI and is also a ball throwing slave for his dogs.