Category Archives: Programming

Calling Method Example in C#

code:

with object creation from class:

If we don’t want to use object we can use static keyword here:

Static method can be invoked with class name:

Can be invoked without creating objects:

 

 

 

 

Data Structure in C#

ArrayList Implementation Example:

ArrayList example:

Stack:

 

Queue:

HashMap

Dicitionary:

 

Playing with C#

 

Clean Code:

 

 

C# Windows Application Form

code:

 

OOP in C#

Calculator.cs

Program.cs

Person.cs

 

C# Book Tips

What is the best way to learn c# ? Ebooks or those four or five hour long seminars about it?

jafhar1 

okay thanks for the advice

rhubarbcheese 

I see it was about 5 months since you asked the question and might have learned it already, As for ebooks Id suggest C# 6.0 in a nutshell, compared to all the other books ive read its the best with more explanations than the other books. I think that is the key to force yourself to answer questions and do excercises and tasks. The greatest mistake people make is not writing enough code and then use all the tools of C# to make that code work, write really redundant code and forget about elegancy in the start. I would NOT learn about their store apps in depth, only to use C# and see it visually. Forget about XAML and all that stuff. Its super time consuming, complex, no compiler to help you out, the documentation is really bad. During all the time I learned I started writing a game and added features / adding more useless code to the game so that I can learn the c# syntax and features, practicing solid principles. Oh yeah, pluralsight.com is really good, dotnetperls.com, stackoverflow.com, the microsoft documentation(I suggest learning how to read that documentation) and a few guys on youtube like kudvenkat and Jamie King helped me out alot.

Hackerearth: COUNT NUMBERS

code:

 

Why Python is Not a Good OOP Language

Anonymous

I’ll go against popular opinion. I started with Python. I did all my projects in my Master’s program in Python. However, after graduating, I started working for a company that worked on Microsoft stack. I realized the importance of strongly typed language when it came to writing large applications. I fell for “hey, how simple it is to write hello world program in python” trick. Everything looks nice, and feels better when you write a to-do app. You’ll see the real face of the language when your application grows. I recommend learning python after you have mastered a strongly typed language like Java/C#. There are “recommended” ways to write Python but not enforced upon. Also, I’ve heard learning about types is not a big hurdle for beginners.

BigInteger in Java and C++

code:

for c++ this link link or google search is good but i didn’t found any goood solution yet:
http://codeforces.com/blog/entry/16380

java:

Simple addition:

BigInt Sum:

 

 

Hackerearth Min-Max

code:

partially accepted code with vector:

 

C++ Vector push_back()…pop_back()

Algo – Linked List

Best Video Explained:

code:

some bugs  here but understood the implementation:

 

Algorithm: Euler’s GCD


code:

more optimized:

 

Recursive:

 

http://www.progkriya.org/gyan/basic-number-theory.html#section3

Algo: Prime factorization of a number

code:

I/O:

 

Prime Number: Trial division | Prime check upto N in C

code:

Help can be find:
http://www.studystreet.com/c-program-print-prime-numbers/
http://www.codingalpha.com/prime-number-c-program/
https://en.wikipedia.org/wiki/Primality_test