He could download the code MediaWiki uses and use it perfectly guiltlessly, because it's Open Source and the whole fucking point of OS is to share knowledge.
Although with him wanting to do it with C#/.NET, it might be more useful to look at the WinMerge source instead, since that's a Windows-based product rather than a PHP one, so probably requires less translation of the ideas.