The late Robertson Davies, who wrote the wonderful Salterton Trilogy, among others, told the Paris Review in 1989 that he actually isn't as knowledgeable as he may appear to be--there's a trick to making it seem like that:
"I say a few things, I provide a few details, but if I may be permitted to say so, I work on the Shakespearean plan. Everybody says, Oh, Shakespeare must have been a sailor. Do you notice how in the beginning of The Tempestpeople cry, “Man the bowsprit,” or “Split the binnacle,” or whatever it is? He must have been a sailor. Others say, No, no, he must have been a lawyer. Remember in The Merchant of Venice he has a scene in a law court that is quite like a law court. No, no, no, Shakespeare must have been a soldier because he has a place where Henry V cries, “Follow your spirits and upon this charge, / Cry God, for Harry, England, and Saint George.” It’s all hooey. Shakespeare had a few telling details that he injected into his plays that made them seem realistic, and I have the same in my novels. I don’t know a very great deal about anything. Indeed, the areas of my ignorance are fantastic in their scope. But you know, I have one reminiscence which has a bearing on this. When I wrote Fifth Business, there were some scenes in it which took place in the First World War, the experiences of a Canadian soldier. I say virtually nothing about the war except that there was a great deal of mud, that there were a lot of horses who might panic, and that most of the time it was infinitely boring. That is all. But you know, one man said to me, “Where were you during the war?” and I said, “Well, frankly, after I got here I was in the cradle.” But he had fought in France and he said that it was just like that. He asked, “How did you know it was like that?” If you have the kind of imagination a novelist needs, you have a notion of why it was like that. You do not need to write endlessly about what kind of sidearms somebody takes when he goes on a night raid and that kind of thing. That creates boredom."
If you're not yet familiar with Davies's work and you enjoy intelligent comic novels, you're in for a treat.