Skip to main content

Microsoft virtual academy Learning C# note 1

Assalamualaikum and Peace be upon you guys.

Yes. Im a malaysian. im saddened over the missing MH370 tragedy. *note that we are not land of witch. okaih~ Keep MH370 in your prayer. Thanks!

btw, after long time

i realized that Microsoft provide us the learning platform over its Microsoft virtual academy.

its just my baby step to study on C#

WHY? im interested in doing C# programming for window phone apps!~ :)

since, the tutorial shown in video, i guess it would be great if i prepare myself own note for future revision!

so here i am.~ if you wanted to learn step by step via video tutorial please do sign up to this windows virtual academy. tonnes of tutorial . awesome tutorial there! http://www.microsoftvirtualacademy.com/

1. Open your C: directory and create a folder name HelloWorld *you can create anywhere you want.
2. Open notepad.
3. Write down the hello world code. note that C# is CASE sensitive same like JAVA. ensure that you type it the same as what ive written here:
 
public class Helloworld {
 public static void Main() {
 System.Console.WriteLine("hello world");
 System.Console.ReadLine();
 }
}

4.name your file as HelloWorld.cs,  save as your file type just now as "All Files". and put it in you C:/HelloWorld folder~
5.run your cmd as Admin. [click start, type cmd, right click cmd, choose run as administrator in the right click menu]
6.now we are going to compile the c# file. using windows console.
so we are going to write simple command!
first we need to go into the framework.net folder. i assumed when you console run its already in C:\Windows\System32 directory. so now you need to change the directory using cd command
 
cd \Windows\Microsoft.NET\Framework 

now you can see the list of files in that directory using command dir, type dir
 
C:\Windows\Microsoft.NET\Framework\dir



at the circled image there, ive highlighted the latest version .net framework that i have in my laptop which is v4.0.20319. you can check yours~. and use that latest one. now type cd  yourversion
 
C:\Windows\Microsoft.NET\Framework\cd v4.0.30319 

what are we actually doing now????????????

we actually just enter the directory.... lol
here


ok now we are going to compile the HelloWorld.cs file and create its .exe(executor file) in C:\HelloWorld folder type below code csc /t:exe /out:c:\HelloWorld\HelloWorld.exe c:\HelloWorld.cs
 
C:\Windows\Microsoft.NET\Framework\v4.0.30319>csc /t:exe /out:c:\HelloWorld\HelloWorld.exe c:\HelloWorld.cs

yeah we are done!

in end we should have this. and click the .exe and we can see hello world! you can either double click the .exe file to run.

or you can type in

 
cd C:\HelloWorld
start HelloWorld.exe





ok.bye.



Comments

Popular posts from this blog

Tutorial on Min3D framework using Android Studio

Salam peeps, UPDATES***, the model on the old link is no longer working. so i have create a github repo, where i put the source code in a project, you guys can try to clone in and run on your android studio device emulator or directly on your phone, Ive replaced the model with a cube. https://github.com/aliaramli/Min3DTutorial Previously i ve posted tutorial on min3D using eclipse IDE, i believe most of us has moved to Android Studio IDE in developing android apps? As previous tutorial shows a lot of support from readers and among hot post in my blog, i ve decided to post the same tutorial but this time using Android Studio. For those who are familiar with Eclipse/Android Studio migration they might not have problem in running this tutorial . For more detail explanation on min3D please visit this website page Ok lets get started. Step One Create a new android project in android studio. you may name it as what you like, below are how i defined my project settings.

Tutorial on min3d framework

Salam all. This time I want to share a bit, how I tried out the mid3d framework for the first time. Acknowledge that I am new to android development.   I just follow the tutorial on Mat-d website but there are certain things that I don’t understand how they actually work. Thus I want to share what I did step by step to make this example work. For explanations on coding/steps or errors please visit Mat-d website here J you ll understand more …. mat-d original tutorial load a 3d obl model with min3d for android Step one . Download min3d into your eclipse . Select File>Import>SVN>Checkout projects from SVN Next. Choose radio button : Create a new repository location Next. Enter the svn location http://min3d.googlecode.com/svn/trunk the thing that we want to check out from the svn is the min3d framework code. Step two. Download obj file  www.3dvia.com …you need to register first..it has free acc version.. and download the followin

Get the last active time from users in woocommerce using sql query

To easily get the last active time from users (under Woocommerce extended plugin) we can easily query from database using the meta_key of "wc_last_active" example query: select user_id, meta_value from wp_usermeta where meta_key= "wc_last_active" and user_id in (11111,112222); results: +-------------+------------------+ | user_id    | meta_value | +-------------+-------------------+ |   11111   | 1556755200 | |   112222 | 1566518400 |