RSS
 

Archive for May, 2010

Discover Object Class @ .Net

31 May

1:     internal class TestHashCode
2:     {
3:         
4:     }
5: 
6:     class Program
7:     {
8:         static void Main(string[] args)
9:         {
10:             TestHashCode testHashCode = new TestHashCode();
11:             Console.WriteLine(string.Format("Object 1 Hash Code is {0}",testHashCode.GetHashCode()));
12: 
13:             TestHashCode testHashCode1 = new TestHashCode();
14:             Console.WriteLine("Object 2 Hash Code is {0}",testHashCode1.GetHashCode());
15:         }
16:     }
17: 

 
 

Active Directory & C#

26 May

the Active Directory service is central component in any windows server starting from windows server 2000. modern operating systems require mechanisms for managing the identities and relationships of the distributed resources that make up network environments. A directory service provides a place to store information about network-based entities, such as applications, files, printers, and people. It provides a consistent way to name, describe, locate, access, manage, and secure information about these individual resources. It is the central authority that manages the identities and brokers the relationships between these distributed resources, enabling them to work together Active Directory lets organizations efficiently share and manage information about network resources and users. In addition, Active Directory acts as the central authority for network security, letting the operating system readily verify a user’s identity and control his or her access to network resources. Equally important, Active Directory acts as an integration point for bringing systems together and consolidating management tasks. Active Directory is the first enterprise-class directory service that is scalable, built from the ground up using Internet-standard technologies, and fully integrated with the operating system. In addition to providing comprehensive directory services to Windows applications, Active Directory is designed to be a consolidation point for isolating, migrating, centrally managing, and reducing the number of directories that companies have. This makes Active Directory the ideal long-term foundation for corporate information-sharing and common management of network resources, including applications, network operating systems, and directory-enabled devices.

Active Directory Diagram

From Technical Point of view:

Active Directory lets organizations store information in a hierarchical, object-oriented fashion, and provides multi-master replication to support distributed network environments.

My Source: http://www.google.com.eg/imgres?imgurl=http://www.esp.com.lb/pigier/W2k/index_files/image002.gif&imgrefurl=http://www.esp.com.lb/pigier/W2k/&h=313&w=492&sz=15&tbnid=URTa6tvKSlAbZM:&tbnh=83&tbnw=130&prev=/images%3Fq%3Dactive%2Bdirectory&usg=___KgC8XmUQF0HTyDL8w5a4QlNJOE=&ei=p978S8DVKJOr4Qa2os2hCw&sa=X&oi=image_result&resnum=6&ct=image&ved=0CCwQ9QEwBQ

 
 

SharePoint 2010 Overview

25 May

SharePoint 2010 is made from two main products

  1. SharePoint 2010 Foundation (Called Previously Windows SharePoint Services ) (Provides the fundamental collaboration services on which the SharePoint platform is built)
  2. SharePoint 2010 Server
SharePoint Foundation 2010 SharePoint Server 2010
Web Management Presentation
List & Libraries
Integrating with Active Directory and security context
Integrating Workflow Foundation services
 
 

DataGridView Empty Row

24 May

in datagrid view, you have one empty row and have an * on the lest most portion of the row. to solve this problem click on the DataGridView and you should see a little arrow in the top right corner. click on that once and you should see a number of options. some of those options have checkboxs and one of them should say “Enable Adding”. Make sure that it is not checked to solve this problem

 
No Comments

Posted in C#

 

Casting @ C#

23 May

using as keyword in c# in conversion from type to another type (CASTING) , use it like “expression as type”  type and expression are references type but what different when as fail to cast the expression to certain type it won’t through any expression but it will fill the expression with null



 
No Comments

Posted in C#

 

Dependency Injection Trip [Station #1]

20 May

i go more than time to understand dependency injection and how we can apply it manually or using any existing framework. and at final i determine to write this trip about dependency injection

Code Snippet
  1. public class Emailer
  2. {
  3. private SpellChecker _spellChecker;
  4. public Emailer()
  5. {
  6. _spellChecker = new SpellChecker();
  7. }
  8. public void SendMessage(string text)
  9. {}
  10. }
 
 

Named & Optional Argument in C# 4.0

18 May

Try this

1:  class Program 
2:     {
3:         static void Main(string[] args)
4:         {
5:              //Standard way of passing values for parameters by its positions   
6:             Console.WriteLine(Add(3, 4));
7:
8:              //Named Argument Calling C# 4.0  
9:             Console.WriteLine(Add(x: 5, y: 8));
10:
11:              //Named Argument Calling C# 4.0 "Not the order isn't important"  
12:             Console.WriteLine(Add(y:33, x: 9));
13:
14:              //Named Argument Calling C# 4.0 "Named Argument must be after fixed arguments"  
15:             Console.WriteLine(Add(65,y:8));
16:
17:              //Error "Named argument specifications must appear after all fixed arguments have been specified"  
18:              //Console.WriteLine(c.Add(y:2,3));  
19:         }
20:
21:         public static int Add(int x, int y)
22:         {
23:             return x + y;
24:         }
25:     }
26:

 
 

Discover word Dynamic in C# 4.0

17 May

in C# 4.0, Microsoft concentrate on dynamic programming, reed more about dynamic programming at this blog Dynamic Programming thinking more about runtime, let’s

 using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 namespace DynamicDemo 
 {
     class Program 
     {
         static void Main(string[] args)
         {
             dynamic employee = new Employee();
             employee.ID = 3;
             Employee dynamicEmployee = new Employee();
             dynamicEmployee 
         }asdsa

The role of the compiler in these examples is to package together information about what each statement is proposing to do to the object or expression that is typed as dynamic. At run time, the stored information is examined, and any statement that is not valid causes a run-time exception.

Overload resolution occurs at run time instead of at compile time if one or more of the arguments in a method call have the type dynamic, or if the receiver of the method call is of type dynamic.

What Difference between var & dynamic keywords in C#?

 
 

Dynamic Programming

17 May
 

Multiple Startup Projects in Visual Studio

16 May

Visual Studio allows you to specify how more than one project is run when you start the debugger.

  1. In Solution Explorer, select the solution.
  2. On the Project menu, click Properties. The Solution Property Pages Dialog Box opens.
  3. Expand the Common Properties node, and click Startup Project.
  4. Click Multiple Startup Projects and set the project actions.

    Multiple Startup Projects

 
 
 

You need to log in to vote

The blog owner requires users to be logged in to be able to vote for this post.

Alternatively, if you do not have an account yet you can create one here.

Powered by Vote It Up