السلام عليكم
كل عام وأنتم بخير
الموضوع برمته منقول كما نوهت في المشاركة السابقة وسامحوني احب اللغة العربية كثيرا وعلى استعداد بإذن الله لمناظرة
اكبر دكاترة اللغة العربية وبثقة !
ولكني في مجال البرمجة خصوصا عندما تقابلني شاشة الكيمبيوتر احب ان اتعلم لغة اخرى كالانجليزية والاسبانية والبرتغالية
وهممت بالكورية لكني لم اجد لها معلما متواضعا !!!
الان هذه المواضيع في الشي شارب ليست موجهة إلا للمبتدئين فيها امثالي بالفعل انا في محو الامية قد اجد من يأخذ بيدي وقد أجد من يسخر او يثبط الهمم لكنني ماض قدماً فالمرء متعلم حتى يموت
لم اجد برنامج قوياً تمت برمجته على البيسك مع حبي لها خصوصا انني في المحرر كأنني اتخاطب مع شخص عاقل وليس مع الة
If then
لكن الحب لا يغني عن في العلم شيئا .... يكفي هرج؟ طيب
الان Your first line of C# code
افتح الفيجوال واختر console application اقل شي تابع الصور ترجمة جوجل تجيب المرض
For now, ignore the lines that start with using as we'll get to them later in the course. But they add references to in-built code. The namespace line includes the name of your application. A namespace is a way to group related code together. Again, don't worry about the term namespace, as you'll learn about these later.
The thing that's important above is the word class. All your code will be written in classes. This one is called Program (you can call them anything you like, as long as C# hasn't taken the word for itself). But think of a class as a segment of code that you give a name to.
Inside of the class called Program there is this code:
static void Main(string[ ] args)
{
}
This piece of code is something called a Method. The name of the Method above is Main. When you run your programme, C# looks for a Method called Main. It uses the Main Method as the starting point for your programmes. It then executes any code between those two curly brackets. The blue words above are all special words - keywords. You'll learn more about them in later chapters.
But position your cursor after the first curly bracket, and then hit the enter key on your keyboard:
The cursor automatically indents for you, ready to type something. Note where the curly brackets are, though, in the code above. You have a pair for class Program, and a pair for the Main method. Miss one out and you'll get error messages.
The single line of code we'll write is this (but don't write it yet):
Now type a full stop (period) immediately after the word Console. The IntelliSense menu appears again:
You can use the arrow keys on your keyboard to move up or down the list. But if you type Writeand then the letter L of Line, IntelliSense will automatically move down and select it for you:
Press the Enter key to add the word WriteLine to your code:
Now type a left round bracket. As soon as you type the round bracket, you'll see this:
WriteLine is another Method (A Method is just some code that does a particular job). But the yellow box is telling you that there are 19 different versions of this Method. You could click the small arrows to move up and down the list. Instead, type the following:
Now type a right round bracket:
Notice the red wiggly line at the end. This is the coding environment's way of telling you that you've missed something out.
The thing we've missed out is a semicolon. All complete lines of code in C# must end with a semicolon. Miss one out and you'll get error messages. Type the semicolon at the end and the red wiggly line will go away. Your code should now look like this:
Note all the different colours. Visual C# colour-codes the different parts of your code. The reddish colour between double quotes means that you want text; the green colour means it's a Class; blue words are ones that C# reserves for itself.
(If you want, you can change these colours. From the menu bar at the top, click Tools > Options. Under Environment, click Fonts and Colors.)
Time now to Build and Run your code!
طيب الان تالع كيف تبني هذا الكود اللي انت سويته
بالمناسبة الشرح تفصيلي فوق وممل يتكلم حتى عن تعابير الالوان المختلفة
ما علينا نكمل مع الاجنبي هذا
How to Run your C# Program
كيف تشغل برنامجك؟
You can test your programme a number of ways. First, though, it has to be built. This is when everything is checked to see if there are any errors. Try this:
The final line is this:
Now try this:
Compile complete -- 1 errors, 0 warnings
Build: 0 succeeded or up-to-date, 1 failed, 0 skipped
So it's telling you that it couldn't build your solution because there was 1 error.
Put the semicolon back at the end of the line. Now click Debug from the menu at the top of Visual C# Express. From the Debug menu, select Start Debugging.
You should see a black DOS window appear and then disappear. Your programme has run successfully!
To actually see your line of text, click Debug > Start Without Debugging. You should now see this:
And that's your programme! Have a look at the Solution Explorer on the right. Because the project has been built, you'll see more files under Debug:
You could, if you wanted, create a desktop shortcut to this exe file. When you double click the desktop shortcut, the programme will run.
But that's enough of Console Applications - we'll move on to creating Windows Applications.
اوكي الى هنا الرجال يقول هذا كافي في الكونسول وتعال نشتغل واجهات ويندوز
بالمناسبة الشرح على فيجوال استوديو 2010 وشكل الويندوز ملينيوم او 98
شايفين كيف احنا فالحين بس في اقتنا احدث الاجهزة والانظمة؟
الدرس القادم اول تطبيق على الويندوز فوم
تجده هنا
http://vb4arb.com/vb/thread-13298.html
ريقي نشف من كثر الهرج
في امان الباري
كل عام وأنتم بخير
الموضوع برمته منقول كما نوهت في المشاركة السابقة وسامحوني احب اللغة العربية كثيرا وعلى استعداد بإذن الله لمناظرة
اكبر دكاترة اللغة العربية وبثقة !
ولكني في مجال البرمجة خصوصا عندما تقابلني شاشة الكيمبيوتر احب ان اتعلم لغة اخرى كالانجليزية والاسبانية والبرتغالية
وهممت بالكورية لكني لم اجد لها معلما متواضعا !!!
الان هذه المواضيع في الشي شارب ليست موجهة إلا للمبتدئين فيها امثالي بالفعل انا في محو الامية قد اجد من يأخذ بيدي وقد أجد من يسخر او يثبط الهمم لكنني ماض قدماً فالمرء متعلم حتى يموت
لم اجد برنامج قوياً تمت برمجته على البيسك مع حبي لها خصوصا انني في المحرر كأنني اتخاطب مع شخص عاقل وليس مع الة
If then
لكن الحب لا يغني عن في العلم شيئا .... يكفي هرج؟ طيب
الان Your first line of C# code
افتح الفيجوال واختر console application اقل شي تابع الصور ترجمة جوجل تجيب المرض
For now, ignore the lines that start with using as we'll get to them later in the course. But they add references to in-built code. The namespace line includes the name of your application. A namespace is a way to group related code together. Again, don't worry about the term namespace, as you'll learn about these later.
The thing that's important above is the word class. All your code will be written in classes. This one is called Program (you can call them anything you like, as long as C# hasn't taken the word for itself). But think of a class as a segment of code that you give a name to.
Inside of the class called Program there is this code:
static void Main(string[ ] args)
{
}
This piece of code is something called a Method. The name of the Method above is Main. When you run your programme, C# looks for a Method called Main. It uses the Main Method as the starting point for your programmes. It then executes any code between those two curly brackets. The blue words above are all special words - keywords. You'll learn more about them in later chapters.
But position your cursor after the first curly bracket, and then hit the enter key on your keyboard:
The single line of code we'll write is this (but don't write it yet):
Console.WriteLine("Hello C Sharp!");
First, type the letter "C". You'll see a popup menu. This popup menu is called the IntelliSense menu. It tries to guess what you want, and allows you to quickly add the item from the list. But it should look like this, after you have typed a capital letter "C":
The icon to the left of the word Console on the list above means that it is a Class. But press the Enter key on your keyboard. The word will be added to your code:
"Hello C Sharp!"
Don't forget the double quotes at the start and end. These tell C# that you want text. Your code will look like this:The thing we've missed out is a semicolon. All complete lines of code in C# must end with a semicolon. Miss one out and you'll get error messages. Type the semicolon at the end and the red wiggly line will go away. Your code should now look like this:
(If you want, you can change these colours. From the menu bar at the top, click Tools > Options. Under Environment, click Fonts and Colors.)
Time now to Build and Run your code!
طيب الان تالع كيف تبني هذا الكود اللي انت سويته
بالمناسبة الشرح تفصيلي فوق وممل يتكلم حتى عن تعابير الالوان المختلفة
ما علينا نكمل مع الاجنبي هذا
How to Run your C# Program
كيف تشغل برنامجك؟
You can test your programme a number of ways. First, though, it has to be built. This is when everything is checked to see if there are any errors. Try this:
- From the View menu at the top of Visual C# Express, click Output. You'll see a window appear at the bottom. (In C# 2010, if you can't see an Output entry, click the Tools menu. From the Tools menu, select Settings > Expert Settings. The Output menu item should then appear on the View menu.)
- From the Build menu at the top of Visual C# Express, click Build Solution
- You should see the following report:
Build: 1 succeeded or up-to-date, 0 failed, 0 skipped
That's telling you that everything is OK.Now try this:
- Delete the semicolon from the end of your line of code
- Click Build > Build Solution again
- Examine the output window
Compile complete -- 1 errors, 0 warnings
Build: 0 succeeded or up-to-date, 1 failed, 0 skipped
So it's telling you that it couldn't build your solution because there was 1 error.
Put the semicolon back at the end of the line. Now click Debug from the menu at the top of Visual C# Express. From the Debug menu, select Start Debugging.
You should see a black DOS window appear and then disappear. Your programme has run successfully!
To actually see your line of text, click Debug > Start Without Debugging. You should now see this:
We now have a ConsoleApplication1.exe and ConsoleApplication1.pdb. The exe file is an executable programme, and it appears in the bin/debug folder. Switch back to Windows Explorer, if you still have it open. You'll see the exe file there:
But that's enough of Console Applications - we'll move on to creating Windows Applications.
اوكي الى هنا الرجال يقول هذا كافي في الكونسول وتعال نشتغل واجهات ويندوز
بالمناسبة الشرح على فيجوال استوديو 2010 وشكل الويندوز ملينيوم او 98
شايفين كيف احنا فالحين بس في اقتنا احدث الاجهزة والانظمة؟
الدرس القادم اول تطبيق على الويندوز فوم
تجده هنا
http://vb4arb.com/vb/thread-13298.html
ريقي نشف من كثر الهرج
في امان الباري
سبحان الله والحمدلله ولا إله إلا الله والله أكبر
اللهم اغْفِرْ لِلمؤمنين والمؤمنات والمسلمين والمسلمات الأحياء منهم والأموات