private object lockObj = new object();
private Dictionary dict = new Dictionary();
public string GetOrAddFromDict(int key)
{
Question a: Is it thread-safe? If yes, why?
Not only is it not thread safe; it will also throw with NullReferenceException if accessed while another thread is reorganizing the hash buckets. The lock statement is wicked fast, don't avoid it.
Question b: How is this double-TryGetValue() pattern called?
It's called a 'bug' by most people ;)