CSharp tips and tricks


CSharp tips and tricks

C# tips and tricks

As we have already discussed C# programming in details but how to solve tricky problems with C# tips and tricks, will make you enable to solve complex problems that often arise and these are the assets of surviving in today’s technology field.
People may learn everything about OOP or ADO.NET but these things do not provide 100% guarantee that you can combat the complex problems that often arise in the field of programming. C# tips and tricks are the main factors of your job survival.
From now onwards, I shall teach you how to deal with many problems from professional software developer’s point of view.
Life’s battles never end and no one is a champion in programming by birth. Even senior most developers need some help to enhance their skills time and time. I.T is the sea and you have to dive deeper and deeper to gain or to do something strange.
Hardest study is an essential element for your success and believe me if you begin to love this profession then you will be awesome.
The world of computer programming expects from you to invent something special using the same tools that you have learned. It’s time to make your mind a logic building machine without taking any tension.
Remember one thing “Learning process never ends”. We are now moving towards a new world in C# development Environment with Visual Studio

A. Pyramid of Asteriks

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication59
{
class Program
{
static void Main(string[] args)
{
int pyramidLength = 10, Blanks, Asteriks;

for (int a = 1; a <= pyramidLength; a++) { for (Blanks = 1; Blanks <= (pyramidLength - a); Blanks++) Console.Write(" "); for (Asteriks = 1; Asteriks <= a; Asteriks++) Console.Write("*"); for (Asteriks = (a - 1); Asteriks >= 1; Asteriks–)
Console.Write(“*”);
Console.WriteLine();
}
}
}
}

asterik pyramid

B. Diamond of Asteriks

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DiamondofAsteriks
{
class Program
{
static void Main(string[] args)
{
int a = 0;
int b = 0;
int number = 3;

for (a = -number; a <= number; a++) { for (b = -number; b <= number; b++) { if (Math.Abs(a) + Math.Abs(b) <= number) { Console.Write("*"); } else { Console.Write(" "); } } Console.Write("\n"); } } } }

diamond of asteriks

Syed Adeel Ahmed
Syed Adeel Ahmed
Analyst, Programmer, Educationist and Blogger at Technofranchise
Computer Systems Engineer from Sir Syed University Of Engineering & Technology.I am passionate about all types of programming.

Published by

Syed Adeel Ahmed

Computer Systems Engineer from Sir Syed University Of Engineering & Technology.I am passionate about all types of programming.