c#

Switch Statements in C#

Submitted by Yorkiebar on

Introduction:

This tutorial is on how to use Switch statements in C#.

Switch:

A switch statement allows a single variable or static piece of data to be checked for mulitple conditions, essentially like a long 'else if' statement but a lot more compact and with slightly more flexability.

Case:

To use a switch statement there are a few other keywords we need to learn first, one of which is 'case'. Case is a possible value of the variable or value being 'switched', this must be of the same data type as the value being switched and must be followed by a colon. Break

Drawing Strings via the Graphics Object in C#

Submitted by Yorkiebar on

Introduction:

This tutorial is on how to draw text in .NET (C#/Visual Basic).

Labels, Textboxes?

I'm sure if you've not looked in to the 'graphics' (etc) objects in the .NET framework, you're thinking, why don't we just use labels or textboxes with their read-only property enabled. Labels and textboxes both have a surrounding area around the text which are both of different colours (however we could change this to the form background colour to give the effect of the backgrounds being removed), but would we create extra controls (labels, and textboxes) when we don't need to?

HTTPWebRequest WebProxy Proxies in C#

Submitted by Yorkiebar on
Introduction: This tutorial is on how to create a HTTPWebRequest in C# using a proxy connection. Why Proxies? Proxies are sometimes required in certain web scraping applications due to the sheer amount of data that needs to scraped. Some sites temporarily - or even permanently - block IP addresses which are requesting/receiving large amounts of data in a short time to avoid the website's full bandwidth being used on that single IP, and therefore stopping the site from going offline for all other users as well.

Random Rolling Numbers Game in C#

Submitted by donbermoy on
In this tutorial, we will create a game called Random Rolling Game using C# that is rolled randomly with its number and has a Progress Bar that serves as a timer. 1. Let's start with creating a Windows Form Application in C# for this tutorial by following the following steps in Microsoft Visual Studio: Go to File, click New Project, and choose Windows Application. 2. Design your interface like this: design 3.

List Management in C#

Submitted by donbermoy on
Today in C#, I will teach you how to create a simple tool in C# to manage lists and listboxes. So, now let's start this tutorial! 1. Let's start with creating a Windows Form Application for this tutorial by following the following steps in Microsoft Visual Studio 2010: Go to File, click New Project, and choose Windows Application. 2.

Config Creator in C#

Submitted by donbermoy on
Today in C#, i will teach you how to create a program that has a config creator in C#. Now, let's start this tutorial! 1. Let's start with creating a Windows Form Application for this tutorial by following the following steps in Microsoft Visual Studio: Go to File, click New Project, and choose Windows Application. 2. Next, add two Textboxes named textbox1 that holds the property name and textbox2 for the property value. Insert two buttons named Button1 that adds property and Button2 for saving config. 3.

Date Calculator using C#

Submitted by donbermoy on
This is a simple tutorial in which we will create a simple Date Calculator program made in C#. On this, it will help you know the dates before and after the present date. For instance, you want to jump into seven days after the present date, the date calculator will automatically calculate it. And you don’t have to count the days anymore, so the user will benefit this kind of program. So, now let's start this tutorial! 1.

Animated Text in C#

Submitted by donbermoy on
Today in C#, I will teach you how to create a program than can have an animated text. With this, you don’t need to drag any Label in the Form. It is because, the codes will be the one to make a text that will be appear in the Form by using the C# language. So, now let's start this tutorial! 1. Let's start with creating a Windows Form Application in C# for this tutorial by following the following steps in Microsoft Visual Studio 2010: Go to File, click New Project, and choose Windows Application. 2.

Compute Exponential Number using C#

Submitted by donbermoy on
In this article, i will introduce again some function in C# regarding the Math Functions, this is Math.Pow(). Math.Pow() Function in C# computes a number that has an exponent.It returns a specified number raised to the specified power. So, now let's start this tutorial! 1. Let's start with creating a Windows Form Application for this tutorial by following the following steps in Microsoft Visual Studio 2010: Go to File, click New Project, and choose Windows Application. 2.