Consider these (excerpts from) comments:
The windows methods are more efficient than FileStream in opening and copying files. Window copy does not open the file.
Wrong:
CopyFile
does open the file and read it in chunks, writing the chunks to the destination file. Also, I'd love to see a benchmark for said claim. Sure, managed code adds some overhead, but once JITted and all it comes down to the same Windows API calls.Irrelevant to the post: the question was about how to remove bytes from the beginning of a file.
Any DLL that is used in you app have to be in the same folder as the exe file for your project
Wrong: DLLs are searched for in a variety of locations and alternative locations can be given.
Irrelevant to the post: the DLL was already in the bin directory as stated in the question, it was a web application (no executable), it was probably about dependencies or version mismatches as usual when .NET claims it can't find a DLL.
An Http message cannot have binary data. You must use Convert to Base64 string. I would use FTP which has a binary mode. FTP is a sub class of HTTP which is meant to transfer files. FTP in binary mode automatically does the conversion to Base64 string.
Wrong: I don't even know where to begin. Not a single sentence holds any value.
DO NOT USE THE MDF FILE NAME IN THEN CONNECTION STRING!!! The database is already connected to the server and the server owns the file so you cannot connect.
Wrong: with LocalDB, you can use a filename in your connection string. The second sentence makes no sense whatsoever.
A connection has three properties 1) Source IP address 2) Destination IP address 3) Port number. You can only have one connection where all three properties are the same. You are trying to open a second connection with the same parameters.
Wrong: source and destination port both count as a separate component of sockets. Otherwise you can't make two connections from one machine to the other at the same destination port. Your browser does this to download resources in parallel.
These comments have the following in common:
- They're posted by the same user
- They're at most partially correct, or more common, grossly incorrect
- They're not incidents, but a pattern, the five above were posted in a two hour timespan
- The user keeps posting comments like this and ignores attempts of other users to correct them, or doubles down and starts trolling
I think these comments are harmful for the site, because they at least confuse the OP of the question or answer they are posted under, and they spread misinformation. This pattern has been going on for years, there's true comedy gold in their profile, but I don't think it's OK to have on the site.
I'm not certain they're doing this on purpose. Maybe they think they're correct, maybe they think they're helping. Knowing that I cannot change this person, but I desperately want them to stop spreading confusion, what can I do?
- Ignore it (not improving the site)
- Keep replying to them, hopefully at least educating the OP they're leaving these comments for (not very productive)
- Flag it with a custom mod message, mention that they're wrong, hope the mod follows up (not very productive)
- ...?
Edit 2020-01-15: it's happened again (multiple times since asking this question actually). A comment was posted to a non-repro question without relevant exception information:
What version of Net are you using (platform). The system library have namespace reserved for linq, but the linq is in a separate dll. So you the compiler will no give errors but you will get an exception when running. So for some reason the ling library is not installed or not part of the Net Library installed.
This is, again, nonsense in every way imaginable. I responded along the lines of:
@user, can you please stop doing this? This error is not being caused by LINQ being partially installed, you're confusing the OP and other readers deliberately.
It may or may not have contained harsher words like "nonsense" or "misinformation". Last time I checked, my comment had three upvotes.
A moderator came along, and deleted my comment, but theirs remains. I'm done.