Warning: I started coding in c# 1 month ago with no pre-existent programming knowledge.
I'm using the following method to center the MessageBox inside the parent window: How to get MessageBox.Show() to pop up in the middle of my WPF application?
I received warning claiming that the AppDomain.GetCurrentThreadId(); method is obsolete, so I found a "solution" here: http://www.pinvoke.net/default.aspx/kernel32/GetCurrentThreadId.html
As the code wouldn't work with uint, I changed it into int and then changed the AppDomain.GetCurrentThreadId(); into GetCurrentThreadId();
[DllImport("kernel32.dll")]
static extern int GetCurrentThreadId();
I've written a fairly complex database program that seems to work flawlessly so far and I understand most of the code behind it, so I would really appreciate if someone could explain to me what exactly I did with the mentioned "solution".