I\'m not sure what people usually mean by \"lock\" a file, but what I want is to do that thing to a file that will produce a \"The specified file is in use\" error message w
As per http://msdn.microsoft.com/en-us/library/system.io.fileshare(v=vs.71).aspx
FileStream s2 = new FileStream(name, FileMode.Open, FileAccess.Read, FileShare.None);