About Course
C# is a simple, modern, general-purpose, object-oriented programming language developed by Microsoft within its .NET initiative led by Anders Hejlsberg. This tutorial will teach you basic C# programming and will also take you through various advanced concepts related to C# programming language.
C# programming is very much based on C and C++ programming languages, so if you have a basic understanding of C or C++ programming, then it will be fun to learn C#.
About Author
This guy is perfect to teach you, how to use C# programming to Develop mobile apps development and to use C# to solve real world problems. he has an great Knowledge in C# programming. he design many projects including someĀ mobile apps, desktop apps etc.
C# Overview.
C# is a modern, general-purpose, object-oriented programming language developed by Microsoft and approved by European Computer Manufacturers Association (ECMA) and International Standards Organization (ISO).
C# was developed by Anders Hejlsberg and his team during the development of .Net Framework.
C# is designed for Common Language Infrastructure (CLI), which consists of the executable code and runtime environment that allows use of various high-level languages on different computer platforms and architectures.
The following reasons make C# a widely used professional language:
- It is a modern, general-purpose programming language
- It is object oriented.
- It is component oriented.
- It is easy to learn.
- It is a structured language.
- It produces efficient programs.
- It can be compiled on a variety of computer platforms.
- It is a part of .Net Framework.
35 Comments
Dear Omer! How can i use ZenBarcode(QrCode) in Crystal Report? Thanks in Advance Haider Shah
Sardar Omar, look at this example, plz,
I am beginner in C# programming. in the above example, I just want to take user input in the same line, and also print the output in same line. thanks in advanced.
Good Day Haya – Look at this example:
You need to change just
console.WriteLine()
toconsole.Write()
Enjoy your learning with InfoBrother:
Hi Infobrother, I did a lot of searching, but find the appropriate answer of my Question. so please could you explain, What is the difference between “polymorphism” and “inheritance”. ??
thank you.
HI Nesha,
Did you read these topic in Our C# Tutorials?? i think you don’t.
so read this tutorial OOP Introduction first to clear your concept about OOP. and read Polymorphism and Inheritance Tutorial.
Hi InfoBrother, its Jimmy from India, I’m learning C#, and I am new in programming world with “NO” experience. i am learning about constructors and i’m Quite confused what’s the difference between methods and constructor. because i am following some books, YouTube Google, and Obviously InfoBrother.com too. i found almost same programming example of constructor in all over where even in your website. so i don’t know how to differentiate them. should i use constructor or should i use method. because its seem same in coding. i would appreciate your ideas. and honestly, it’s interesting to learn coding through your website. because its really conceptual and easy to understand each and every topic.
thank you in Advance.
cheers:
Hi Jimmy thanks for your good response. and enjoy your learning with infoBrother.
Thank you Jessa Rose, could you please explain the words Implicitly and Explicitly. well I know the meanings, but I don’t know, what does it mean in C#??
When We create an Object with
new
Keyword, constructor automatically runs, mean Implicitly. And When we want to invoke a method, we clearly tell the Object to run that method, mean Explicitly.Hi There, Well what is the default access Modifiers For Class and Members in C#?
Hi Andrew, The Default Access Modifiers at Namespace level are Internal: and at Class Level are Private:. Consider the Following Example:
is Equal to…
Hi this is Maria from Delhi (india). i was writing some code using switch statement like this way:
i know the above code is good, and will work too. but i want to write this code in this way:
but this method is not working, so please can you show me some methods like this, in sense of short cut.
thankx.
Maria, your first method is good, but there is no syntax in C# or C++ for your second method that you mentioned.
however if you have a big ranges, you can use just the series of if-else statements:
Yes Maria, Brian Bondy is right, there is no way to use your second method in C#. but still you can mix your both methods in a syntactically way like this:
thank you for your comments, enjoy your learning with infoBrother.
Got it, so i need to replace colon with comma, that’s it??
Yep exactly, that’s it…
Ok Thank You Sardar.
thanks for your support, Good luck
HI Infobrother how you doing, I am Jasmeen from Lahore. I am in beginner level in C#. I came across from a source code, and I found something like this:
so I just want to know, what exactly is this, as per me, there are 3 statement in for loop, but here, no statement. what is this??
thanks in advance.
Hi Jasmeen, welcome to C# world. it’s an infinite loop with no condition, lemme explain this to you.
in General we write for-loop something like this:
in above for loop there are three parameters or statements, these statements are optional, The basic syntax of for-loop is:
for(initial; condition; operation)
if we don't declare any conditions for the loop, the default condition of for-loop kicks in that is true so the loop condition will be always true, and will continue the loop, till you terminate the program yourself.
Hi buddies,
how exactly I can write the same code using ?: or ?? Operators:
thank you.
These Operators are not designed for control flow, it’s only designed for conditional assignment.
The expression:
a ? b : c
evaluates to b if a is true and evaluates to c if a is false.b ?? c
evaluates to b if b is not null and evaluates to c if b is null.and if you write return
a ? b : c;
orreturn b ?? c:
they will always return somethings.Thank you Sardar Omar, and sana for your kind response. BTW you have awesome collection of tutorials. really easy and conceptual for beginners. any body can start from scratch easily using this site.. keep it up infobrother team. (y)
Hello Infobrother,
is there any or Operator in C#?? like I want to do this,
how how to do this in C#??
C# Support two Boolean “or” Operator.
The single bar “|” and the double-bar “||“.
The difference is that, the single bar “|” always checks both the left and right conditions, while the double bar “||” only checks the right-side condition if it’s necessary (if the left side evaluates to false).
so you can use this syntax:
Thank you Jessa. I understand now.
Hi there, we in C++ we can define a constant like
#define var1 = 9;
so how can I do this in C# Programming ??Hi Jea. in C# we can do this using “Const” Keyword:
Example:
public const int var1 = 9;
What does the @ symbol before a variable name mean in C#?
We can’t use keyword as an identifier or variable name. in this case we can use “@” this symbol to reserved an keyword as an identifier.
Example:
Ok, Thank you so much. this tutorials is really good and easy to understand. keep it up.
I am doing some classification and I am not sure:
INT is a primitive datatype with keyword
"int"
But I can use
Int16,Int32 or Int64
– I know C# has its own names for them. But are those data types as well or it is still INT? And mainly, can we say “short
” is a datatype orINT16
is a datatype?Thanks š
In C#, the following examples are always true:
Both versions are data types. All of the above are integers of various lengths and signed-ness.
The main difference between the two versions (as far as I know) is what colour they are highlighted as in Visual Studio.
I like your way to explain this topic. http://www.infobrother.com/Tutorial/CSharp/Csharp-Environment-Setup Impressive:
thank for such a easy and awesome tutorials.
good luck.
Ask Question?