What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other?
بتحب المواقع ؟ بتعرف تبرمج ؟ كبيرك فوتوشوب وفلاش ؟ تعالى لأبو العريف ! .1
يعنى قبل مالصفحة تظهر لنا فى المتصفح ... تمر بالعديد من المراحل الداخلية والمهمة لكل مبرمج أن يعرفها
ممكن أن نلخصها كالتالى
1. Object Initialization
..........................................................................
2. Load Viewstate Data
3-LoadPostData Processes Postback Data
4. Object Load
........................................................
5. Raise PostBack Change Events
6-Process Client-Side PostBack Event
.......................................................
7. Prerender the Objects
8. ViewState Saved
......................................................
9. Render To HTML
10. Disposal
Can you prevent your class from being inherited by another class?
Yes. The keyword “sealed” will prevent the class from being inherited.
Can you inherit multiple interfaces?
Yes. .NET does support multiple interfaces.
What’s the difference between an interface and abstract class?
In an interface class, all methods are abstract - there is no implementation. In an abstract class some methods can be concrete. In an interface class, no accessibility modifiers are allowed. An abstract class may have accessibility modifiers.
What’s a delegate?
A delegate object encapsulates a reference to a method.
What’s a multicast delegate?
A delegate that has multiple handlers assigned to it. Each assigned handler (method) is called.
What is the role of the DataReader class in ADO.NET connections?
It returns a read-only, forward-only rowset from the data source. A DataReader provides fast access when a forward-only sequential read is needed.
What are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET?
SQLServer.NET data provider is high-speed and robust, but requires SQL Server license purchased from Microsoft. OLE-DB.NET is universal for accessing other sources, like Oracle, DB2, Microsoft Access and Informix. OLE-DB.NET is a .NET layer on top of the OLE layer, so it’s not as fastest and efficient as SqlServer.NET.
What namespaces are necessary to create a localized application?
System.Globalization and System.Resources.
How do you convert a value-type to a reference-type?
Use Boxing.
What happens in memory when you Box and Unbox a value-type?
Boxing converts a value-type to a reference-type, thus storing the object on the heap. Unboxing converts a reference-type to a value-type, thus storing the value on the stack.
Mark Wagner's .NET C# Cogitation
إن شاء الله نراجع على بعض التعريفات اللى هنا
classes are reference types stored in the heap,
structs are value types stored on the stack
structs don’t support inheritance
classes support inheritance
You will tend to use structs for smaller data types for performance reasons
you could intialize structs without the new keword
... but in classes u have to
public struct Point {
public int x, y;
public Point(int p1, int p2){
x = p1;
y = p2;
}
}
in other place u could use
Point myPoint = new Point();
Point yourPoint = new Point(10,10);
and use
// Declare an object:
Point myPoint;
// Initialize:
myPoint.x = 10;
myPoint.y = 20;
A recursive method is a method that calls itself
either directly or indirectly through anothermethod.
if we want pass a variable to a method as reference so the original value affected
من الاخر بص على المثال ده
int value1 = 5 ;
int value2 ;
واحد معملوا intialize
والتانى لأ ... متعرف بس
وتخيل إن عندنا ثلاثة دوال أو methods
void public increaseR (ref int x){
x = x+1 ;
}
void public increaseO (out int x){
x= 20 ;
x = x+1 ;
}
void public increase (int x){
x = x+1 ;
}
---------------------------------------------------------------------
لو إحنا جربنا الحاجات دى ياترى هاتدينا إيه ؟
increaseR (ref value1) ;
increaseO (out value2) ;
فى الحالة الأولى القيمة الأصلية هاتتغير للأثنين فى البرنامج كله
value1 = 6
value2 = 21
increase(value1) ;
increase(value2) ;
فى الحالة الثانية القيمة الأصلية مش ها تتغير للأثنين فى البرنامج كله
value1 = 5
vaue2 --- gives what ??? and why ???
in C#. Data
types are either value types or reference types.
1- A variable of a value type contains data of that type.
2-A variable of a reference type, in contrast, contains the address of the location in
memory where the data are stored.
Value types normally represent single pieces of data, such as int or bool values.
Reference types, on the other hand, refer to objects, which can contain many individual pieces of data.
1-C# contains many predefined classes that are grouped into namespaces.
2-Collectively we refer to this preexisting code as the Framework Class Library.
3-The actual code for the classes is located in .dll files called assemblies.
يعنى نفهم من كده إن النييم سبييس عامل زى الفولدرز بينظملك الكود بتاعك وكمان لييه فايده كبيررة وهو إنه لما تستخدم مكاتب برمجية من الخارج
classes
لو إسمها متشابه مع إسم كلاس إنتا عامله مايحصلش أى لبس ... لأن الكود بتاعك فى نييم سبييس والكوود بتاعه فى نييم سبييس تانى
Namespaces are the way that .NET avoids name clashes between classes. They are designed to avoid the
situation in which you define a class to represent a customer, name your class Customer, and then
someone else does the same thing
مثال
namespace Programming_C_Sharp
{
namespace Programming_C_Sharp_Test
{
using System;
public class Tester
{
public static int Main( )
{
for (int i=0;i<10;i++)
{
Console.WriteLine("i: {0}",i);
}
return 0;
}
}
}
}
The Tester object now declared within the Programming_C_Sharp_Test namespace is:
Programming_C_Sharp.Programming_C_Sharp_Test.Tester
This name would not conflict with another Tester object in any other namespace, including the
outer namespace Programming_C_Sharp.
مش عايز أحكى إنى رحت إمتحنت فى شركة كبيرة ومش عايز أقول أهمية برمجة الكائنات ومش عايز أقول إن الشركات الكبرى بتهتم جدا بالتعريفات الأساسية لبرمجة الكائنات ... أنا هادخل فى الموضوع على طول وهاحاول أكتب قدر إستطاعتى الأسئلة اللى ممكن تتسألها وإنت رايح تمتحن أو فى المقابلة الشخصية ..... وبالتوفيق :)
بسم الله والحمد لله والصلاة والسلام على رسول الله
سعدت كثيرا بنشر مقالتى .. وحيد فى المعمل .. وهى تجربة خاصة خضتها فى السنة الأولى فى كلية العلوم ... وذلك عندما إبتدأ الدكتور ب .... لا لا ... أدخل الموقع وأقرأها بنفسك لأن أقص عليك شيئا .... :)
http://www.55a.net/firas/arabic/index.php?page=show_det&id=1090&select_page=13
ملحوظة : هذه المقالة ستساعدك علىفهم لقطعة الفلمية للبى بى سى