Worth to read one time friends…
Programming is Easy…
When we want to execute any code in our environment we would first like to know from where the code came from. Depending from where it came from, then we would like to give him access rights. For instance a code compiled from your own computer would have greater rights than code downloaded from the internet.
So, Code Access security is a security model which grants or denies permission to your assembly depending on evidences like from where the code has emerged, who the publisher is? , strong names etc
What is evidence in CAS?
Evidences are like who is the publisher of the code , from which site has this code from , from which zone has it come from ( internet , intranet etc) etc.
What is a permission and permission set?
There are various permissions which you can assign to the code like Can the code create a file, can we write to registry, can the code execute reflection, can the code open file dialog box etc.
These permissions are collect permission sets and those permission sets are allocated to the code.
What is code group?
A code group is a logical grouping of code that has a specified condition for membership. Any code that meets the membership condition is included in thegroup. Code groups have associated permission sets that are evaluated during a policy grant.
So how does CAS work on runtime?
• Evidences are gathered about the assembly. In other words from where did this assembly come?
• Depending on evidences the assembly is assigned to a code group. In other words what rights does the assembly depending on the evidence gathered.
• Depending on code group the assembly is allocated security rights.
• Using the security rights the assembly is run with in those rights.
CAS is completely deprecated in .NET 4.0, there are two big changes:-
• Granting of permission is no more dependent on the .NET CAS, it’s now the job of the host. So the host who runs the .NET DLL will define what kind of rights will the assembly have. NET Framework 4.0 comes with CAS a disabled which means all applications started via Windows Explorer or the command prompt run with full trust. Hosted .NET applications, those running inside Internet Explorer or ASP.NET, will run at the trust level granted by their host, being partially trusted.
• Security transparent model is introduced which divides a .NET code in to 3 categories Security critical, Security transparent and security safe critical.
Generic helps us to decoupled the logic from data types i.e we tell the type at run time.
public bool Equals(UnknownType a, UnknownType b)
- Mostly used in the utility and common helper classes so we can access the common functions directly using class name instead of creating the class object every time.
- A class containing private constructor can not be instanciated.
- A class containing private constructor can not be inherited.
We can control the visual order of HTML elements using CSS as described below-
1) Using CSS-Order Property :
2) Using display:box Property :
Programming is Easy…
What is a Data Structure?
- A data structure is a systematic (or programmatic) way of organizing (or storing) the data, so that the data can be used efficiently.
- A data structure is a collection (grouping) of simple or structured data types and a set of rules (operations) for organizing and accessing the collection.
- A logical way of storing data and it also define mechanism of retrieve data.
Data Structure Types?
- Linear : Data organize in a linear manner where data elements attached one after the other (i.e data items are placed in the memory contiguously).
- Linked List
- Non – Linear : Data organize in a random manner where data elements are attached one to many (i.e a data item is connected to several other data items).
- Traversing : Accessing each data item exactly once so that it can be processed.
- Searching : Finding the location of the data item if it exists in the given collection of data items.
- Insertion : Add a new data item in the structure.
- Deletion : Removing a data item from the structure.
- Sorting : Arranging the data items in some order.
- Merging : Combine two data structures into one.
…. more to come soon.