What's Wrong - .NET Practical Interview Question #3

  Рет қаралды 2,608

DotNetMastery

DotNetMastery

Жыл бұрын

In this series we will see short videos to identify bad coding practices and bad code!
Full Course (60+ interview Questions) : www.dotnetmastery.com/Home/De...
It is meant for anyone in .NET domain to improve their coding knowledge.
If you have some examples you want to share with the community you can send them here forms.gle/FUuLB7bRxsXgqiWH6
To see more in-depth full courses go to : dotnetmastery.com/
Support more free content? ☕ Coffee: www.buymeacoffee.com/bhrugen

Пікірлер: 15
@dy0mber847
@dy0mber847 11 ай бұрын
Else statement should also be omitted because we are using return inside if, no need to use else in this case
@DotNetMastery
@DotNetMastery 11 ай бұрын
Indeed! But sometimes I like code readability over less code!
@prateektomar4874
@prateektomar4874 11 ай бұрын
I appreciate the series!!
@ishaz11
@ishaz11 11 ай бұрын
I like this series. Please keep it up
@DotNetMastery
@DotNetMastery 11 ай бұрын
Thank you will do!
@oremichenjesumeichen7801
@oremichenjesumeichen7801 11 ай бұрын
This series is great 👍
@TELUCODER
@TELUCODER 11 ай бұрын
The best video on KZbin channel till now keep posting these sir
@DotNetMastery
@DotNetMastery 11 ай бұрын
I will try my best
@being_aslam_tiger
@being_aslam_tiger 11 ай бұрын
Please Make a design pattern playlist. Like gang of four design patterns C#.
@cavila0217
@cavila0217 11 ай бұрын
Thanks for the tip!
@DotNetMastery
@DotNetMastery 11 ай бұрын
You bet!
@pilotboba
@pilotboba 11 ай бұрын
I guess my first question would be, if you don't want to allow a string, why do you use nullable string? I also don't see the routing definition for this. Also, I don't know if this is MVC5 or Core/Modern dotnet. So, I'm not sure how this would be called. Would it be: /Home/Index?userid= or /Home/Index assuming routing is used like /Home/Index/{userid} then if no user id is in the URL it won't even be routed to this endpoint. You can also use route constraints to eliminate the need to do the is empty check. Although, like I said, it looks like this is not using attribute routing. Also, wouldn't use ==null, but rather do pattern matching. Granted you used the IsNullOrEmpty which covers the null check. Finally, it's redundant to pass the view name if it matches the action name.
@pilotboba
@pilotboba 11 ай бұрын
Also, if you are using string? I assume you are using Null Refernce feature, because normally a string can be null, it's not a value type.
@DotNetMastery
@DotNetMastery 11 ай бұрын
Hello, in the example we are using the case when userid is not present to display a value of “No user id”
@ajaymanav2010
@ajaymanav2010 11 ай бұрын
It would be good to create some good content..these are the basics that you have coverd in your videos and i believe every developer is aware of it ..let's contribute with some real and practical interview scenarios that would help
What's Wrong  -  .NET Practical Interview Question #4
3:02
DotNetMastery
Рет қаралды 2,4 М.
What's Wrong - .NET Practical Interview Questions
3:09
DotNetMastery
Рет қаралды 1,5 М.
Children deceived dad #comedy
00:19
yuzvikii_family
Рет қаралды 4,7 МЛН
Can teeth really be exchanged for gifts#joker #shorts
00:45
Untitled Joker
Рет қаралды 15 МЛН
HTMX & Go with ThePrimeagen | Preview
15:58
Frontend Masters
Рет қаралды 146 М.
What’s the Result Type Everyone Is Using in .NET?
14:47
Nick Chapsas
Рет қаралды 102 М.
The art of misdirection | Apollo Robbins | TED
8:48
TED
Рет қаралды 27 МЛН
Java for the Haters in 100 Seconds
2:22
Fireship
Рет қаралды 2,7 МЛН
Single vs First vs Defaults in Entity Framework Core / LINQ
9:28
DotNetMastery
Рет қаралды 4,5 М.
Cookie vs Token based Authentication - What's the Difference?
5:52
DotNetMastery
Рет қаралды 4,5 М.
CPR in Action | A 3D look inside the body
3:19
Action First Aid
Рет қаралды 10 МЛН
Children deceived dad #comedy
00:19
yuzvikii_family
Рет қаралды 4,7 МЛН