Skip to main content

Posts

Showing posts from 2019

Object Oriented Programming in C#

Object Oriented Programming in C# Object oriented programming (OOP) is a programming structure where programs are organized around objects instead of action and logic used in the early age of programming, though some still organize their programs around actions and logic. Understanding OOP concepts can help make decisions about how you should design an application and what language to use. Everything in OOP is placed together as self-sustainable or self-contained “objects.” An object is a combination of variables, functions, and data that performs a set of related activities. When the object performs those activities, it defines the object’s behavior. In addition, an object is an instance of a class. C# offers full support for OOP including inheritance, encapsulation, abstraction, and polymorphism. Lets deal with the attributes of OOP one after another. Inheritance Inheritance in OPP, is the ability to receive (“inherit”) the behaviours and states of an other existing cl...

If statement in C#

C# If statement If statement is one of the flow control and conditional statements in C# programming language. Control flows change the execution flow of a programming language. If someone for example, want to execute a particular statements based on some logic, then flow control and conditional statement come up. The if statement is used to evaluate a Boolean expression before executing a set of statements. The statements are run if the expression evaluate to true else it will run another statement. Syntax if(boolean expression) {     //statements to run } Code using system namespace csharpnaijaDemo {    class program    {       static void main(string[] args)       {            int value=10;            if(value <= 10)             {                   Consoile....

Looping in C#

Looping in C# Looping in programming language is a way to execute a statement or a set of statements repeatedly for a number of times depending on the result of condition to be evaluated. The result of the  condition should be true for the statements within the loop body to be executed statements. Loop Category There are mainly two categories of Loop; these are Entry Controlled Loops These types of loop have their conditions tested in the beginning of the loop body. example are While loop and for loops. Exit Controlled Loops These are loops in which conditions are tested at the end of loop body.   do-while  is an example of exit controlled loop. Note:  In Exit Controlled Loops, loop body will be evaluated for at-least one time as the testing condition is present at the end of loop body. Example of entry controlled loops while loop In while loop, t he test condition is given in beginning of loop and all statements are executed till the give...

Palindrome Words in C#

How to determine if given word is palindrome Palindrome is a word that spells same both backward or forward lets have a method the returns true or false based on the status of the word whether palindrome or not public bool IsPalindrome(string words) {      //declare a variable named reverse and set it to empty string     string reverse=string.Empty;     for (var index=words.Length-1,index >=0;index--)    {         reverse +=words[index].ToString();     }     if(reverse == words)       return true;      else          return false;  }  static void Main(string[] args) {    Console.WriteLine("Enter a word");    string words=Console.ReadLine();    var isPolindrome=IsPalindrome(words);    if (isPolindrome)    {        Console.WriteLine("The  ...

Palindrome Number in C#

How to determine if a number is palindrome or not in c# Let us first know what is palindrome   Palindrome is a word, phrase, or sequence that reads the same backwards as forwards, e.g. madam or nurses run,civic,deleveled,level,rotor. from the definition we can now write the algorithm 1. get the number 2. store the number in a temporary variable 3. reverse the number 4. compare the temporary number with the reversed number if same return palindrome or return not palindrome the implementation in C# let use modular programming for this class program{   static void Main(string[] agrs){        int number;        Console.WriteLine("\n >>> To Find a number is Palindrome or not <<<");        Console.Write("\n Enter a numer");        number=Convert.ToInt32(Console.ReadLine());        var isPalindrome = IsPalindrome(number);       ...

Expression and Statement in C#

Difference between statement and expression In programming language terminology, an “expression” is a combination of values and functions that are combined and interpreted by the compiler to create a new value, as opposed to a “statement” which is just a standalone unit of execution and doesn’t return anything.  C# Expressions An expression in C# is a combination of operands (variables, literals, method calls) and operators that can be evaluated to a single value. To be precise, an expression must have at least one operand but may not have any operator. Let's look at the example below: float price; price = 42.05; Here,  42.05  is an expression. Also,  price  = 42.05   is an expression too. int x, y, z, sum; sum = x + y + z; Here, x  + y + z  is an expression. if (age>=18 && age<58) Console.WriteLine("Eligible to work"); Here,  (age>=18 && age<58)  is an expression that returns a...

C# statements

Statement in c# is line of code that ends with a semi colon which does something. Eg Assignment var a=2; var b=3; var c=a+b; // arithmetic expression Logical If (a <b)  return a; C# statements are made up of keywords, expressions and operators which end a semi colon.

C# Naija Introduction

CSharp Nigeria You are welcome to CSharp Nigeria, a blog that introduces and teaches public the C# programming language and technologies also to provide a guide on how to be a C# developer to get highly paid job or to be freelance developer.  Do you want to be a software developer using C# programming language and start earning good salary within three months at a give-away price? Try our online project-based software Development hands on training Contact the following for more info Name: Musa Sule Gadabs Email:  musagadabs1@yahoo.com  or  musasule79@gmail.com Phone Number: 08032299383

C# as a Programming Language

Let continue with learning C# as a language first C# programming is very much based on C and C++ programming languages and the simplicity of Visual Basic .net, so if you have a basic understanding of either C ,C++ vb.net programming, then it will be fun to learn C# 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. Some of the major features of C# as a Language The construct of C# closely follow traditional high-level languages, such as C and C++ and being an object-oriented programming language. It has strong resemblance with Java, it has numerous programming features that make it adaptable to a number of programmers worldwide. Following is the list of few impo...

Software Development with Ease

Software Development with Ease Learning programming language of any kind can be frustrating and time consuming but the joy of doing what you love doing and the derive to solve problem for humanity keep you moving as a developer. To learn programming quickly and with fun, follow this blog and u will be a developer for the fact that we are going to be given you all it takes to be a developer. We will be going through software development processes step by step.

How to get a good job as a C# developer in Nigeria

Things you need to get a job as a C# developer in Nigeria The following are some of the good ways to get good job as a developer in Nigeria 1. Build your software development skill 2. Have some software products developed even if is for free 3. Have some certifications even if is from free sites like SOLO Learn 4. contribute to open source Building the software development skills A software developer is always updating and upgrading his skills on the daily, weekly, monthly or yearly basis because, the technologies changes almost every day. Learn the new paradigm or the tool that evolve from the technology you are using for the development. For instance, in C#  desktop application were developed using windows Form applications, later Windows Presentation Foundation (WPF) was used for desktop application. For Web application, it was asp classic, asp.net winform, then asp.net MVC .net framework and now  asp.net core. So, as the technology changes, we try to upda...