question

yusuf2 avatar image
0 Votes"
yusuf2 asked DSPatrick edited

What do I need to master C#

Hello everyone.
I learned VB.NET through long practice and then moved to C#, when I want to use a new technique I looking for tutorials and searching of a similar code while programmers can learn about the new technology by previewing the code only, if you look at the questions that I post you can notice my programming weaknesses.

How can I program like a pro?

Thanks



dotnet-csharp
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I am very fluent in vb.net. (and still do lots of VBA).

So, how did I jump and get up to speed in c#? (of which now I have a high comfort level also).

Well, a big part for me was actually spending time in on-line forums!

I would often see a question - but it was c#, and not vb.net.

So, I started out by using a on-line code converter. This one:

converter.telerik.com

(by the way Telerik has some great tools).

Anyway, the code converters often mess things up. but the code converter does lay out the code for you.

But, they allowed me to see vb.net code as "mostly" converted to c#.

And if you really comfortable with vb.net, then the jump to c# is not all that large. I mean, type becomes before variable defs, arrays use [] in place of ().

Next thing you know? I can now quite much code in both. So really, if you have any amounts of some vb.code code, then try re-writing in c#.

I think writing code is really the only way to get better in a short amount of time.

At the end of the day? Its not really that much about c# or vb.net. However, given that c# is so popular, then being able to read c# code, even for code I need in vb is welcome.

If you really want to get better? You have to write code. Either create a sample project, or re-write something you like and had in vb.net.

Now, I am lucky, since I did good time in Pascal, and thus "block" style languages like c# or now JavaScript are thus easy for me to pick up.



0 Votes 0 ·
Paul-5034 avatar image
3 Votes"
Paul-5034 answered

Unfortunately mastery in programming is often an ongoing process, particularly in languages in C# where development rarely slows down. Having said that there are resources that are always worth going through that'll speed up getting to the level you want to be at:

  • Get a basic familiarity by reading through documentation: https://docs.microsoft.com/en-us/dotnet/csharp/

  • Reading the devblogs for new features (you'd be surprised how after professional developers neglect to do this, so it's definitely beneficial to keep up to date): https://devblogs.microsoft.com/dotnet/

  • Understanding common programming patterns: https://refactoring.guru/design-patterns/csharp

  • Looking through a lot of other people's code and slowly trying to gain an intuition for what large C# projects look like and why they look like that

  • If you're using a particular API inside C# and you want to understand how it works, you could have a dig around inside the C# reference source: https://referencesource.microsoft.com

  • Maybe you want a more holistic view of .NET as a platform - in which case you could clone some of their repositories and have a root through the bits that interest you: https://github.com/dotnet

  • Reading through topics that come through forums like this one also has helped me keep an eye on what's going on in domains that I don't normally venture in for my career

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

karenpayneoregon avatar image
2 Votes"
karenpayneoregon answered

If you have a decent knowledge of VB .NET then consider

  • Getting a Pluralsight account (it's not free), if you do nothing else this coupled with reading Microsoft Docs is a great start

  • When getting your feet wet with C# my recommendation is to learn by using unit test projects. Using test methods is two fold, you learn unit testing which every developer should know (but the vast majority no little or nothing on unit testing) then there is the fact of no user interface to get in the way of learning

  • Check out the following repository for beginner level unit testing.

  • Do a search for C# cheatsheets, pick one topic at a time and learn it inside and out.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.