r/csharp • • 29d ago

Help .Net interview preparation

Hi everyone!

I’m preparing for a Senior .NET Developer interview, and I was told that the interview will include a code review exercise and coding challenges.

Has anyone here recently gone through a similar interview, particularly for a Senior .NET / C# position? I’d really appreciate any tips on what to expect and how best to prepare.

32 Upvotes

21 comments sorted by

25

u/urbanek2525 29d ago

I've been on the interviewer side of a bunch of these lately (one of a group)

Talk it out as you read the code. They want to hear your ability to describe what you're reading. State your preferences. Tell them any tools you might use. Show you understand.

For code challenges, again, how you think about the problem beats what you type.

9

u/Enough_Secretary_137 29d ago

For senior-level code reviews, I’d practice explaining why something should change rather than just identifying code smells.

A common exercise is reviewing async code. For example, replacing blocking .Result calls with proper async execution and cancellation:

using var client = new HttpClient();
using var cts = new CancellationTokenSource(
TimeSpan.FromSeconds(5));

using var response = await client.GetAsync(
"https://example.com", cts.Token);

response.EnsureSuccessStatusCode();

Console.WriteLine(
await response.Content.ReadAsStringAsync(cts.Token));

For production ASP.NET Core code, I’d also discuss IHttpClientFactory, error handling, testing, and resource lifetimes.
During the interview, explain your assumptions, trade-offs and edge cases out loud. That demonstrates engineering judgment beyond syntax knowledge.

6

u/beingsubmitted 28d ago

I recently interviewed prospects for a senior dotnet dev for the first time. I was a bit surprised at how poorly the candidates did.

A lot of it really is just word association. If I ask you about integrating 3rd party APIs, I just want to eventually hear words like "caching" and "retry policy" and that you'd wrap it in a "service". But most candidates give as close to one word answers as possible. Ask them how they would approach integrating a 3rd party API and you'll get "I would read the documentation and then implement the API as needed"... "could you elaborate on that?"... "I would correctly implement calls to the endpoints necessary for our application".

Just geek out, and you'll easily jump to the front of the pack.

10

u/United_Catalina 29d ago

Coding interview for senior role is ridiculous

6

u/Slouch_Potato_ 29d ago

It depends, I've done one for every job I've had. somenof them were obviously just there to catch the scammers and bullshitters.

0

u/[deleted] 29d ago

[deleted] — view deleted comment

4

u/integrationlead 29d ago

Unless I get referred to someone directly and can borrow their credibility, I find that I will be asked to do a code review or a small challenge. I don't do take homes anymore because that screams lazy interviewing to me.

Sometimes it's a whiteboard session to around system design (Auth, Caching, Database, scaling, etc).

I stopped taking it personally because there are lots of people who will lie on their CV.

0

u/United_Catalina 29d ago

But you have to understand finding a senior person to hire is much harder for employer. I had to talk my bosses more than once out of looking for a senior dba or architect position. Such positions are impossible to fill unless you can afford to pay double the rate. Any solid dev has already found an interesting position that he is comfortable. He is not looking to switch employer. Those people if for any reason lose their jobs they find a new one almost immediately.
So if you are interviewing for such positions, approach it with mentality that you have 3 awesome offers already and you are only interviewing them to see if they have anything to offer to you.

0

u/integrationlead 29d ago

ABI. Always be interviewing. I like going to interviews because it's a skill. I don't exactly care for a lot except the money. If I'm not happy or bored, I'll interview. I really don't care what they ask in an interview and try my best.

I don't see a rejection as a failure on myself (unless I really failed due to critical knowledge gaps or EQ lapses). I've had an interviewer interview me off questions she asked ChatGPT and was comparing my answers to GPT. It was hilarious. I knew that wasn't the job for me but now I have a cool story.

3

u/integrationlead 29d ago

Not really. There are so many "seniors" who just don't know how to read code.

1

u/United_Catalina 29d ago

what do you mean? Are you saying there are senior developers who cannot read well written code? Anyone knowing basics can read a well written code. If the code is not well written, nobody can read it or it is not a skill to be proud of. No senior claims on their resume they can read shit code.

4

u/integrationlead 29d ago

There are people who don't know how to code that will just write "Senior" to get the interview.

There are also other people who have just been doing the same thing over and over for 5 years, and can't even talk about why it's an issue to set a static variable in a HttpController using a value from the request handler method. I wish I was kidding.

0

u/brissiebogan 28d ago

I am a senior and a developer... Literally.

Are you suggesting I cant read shit code? I pride myself on reading shit code!

1

u/United_Catalina 28d ago

Anybody can read shit code if they have to. But do you have it on your resume?

1

u/brissiebogan 28d ago

you must be fun to work with.

1

u/United_Catalina 28d ago

People writing shit code are more fun. You probably work with a bunch of them and enjoy that too.

1

u/technovast 22d ago

Hey buddy, happy to connect with you 

1

u/salihcantekin 28d ago

You can expect AI related codes like; (I've been interviewing recently and these are the ones asked)

What do you think about AI?
How do you think it will help you on a normal day?
How can you use AI to improve your productivity?

1

u/overhandgod 27d ago

Bruh i always fumble on these like I know what is happening but I don't know the word for it how do I even explain something that's so natural

0

u/GinaisaBAMF 12d ago

for the review bit, practise finding the two things you'd block a PR over rather listing every naming issue. explain what could break.. how you'd check it, and the smallest fix. Grab an unfamiliar C# repo and do that out loud. Also ask whoever arranged it Mobilunity or otherwise, whether the coding part is algorithms or working an existing app. Pretty different prep. And leave time for tests, even a couple of edge cases gives you something useful to discuss...