Category Archives: C#

C#. Threads and delegates

delegates gives functionality of creating additional threads… examples

   

Posted in C# | Comments Off on C#. Threads and delegates

C#. Dynamic

Dynamic – key word, specialized form of object. limitations – doesn’t work to lambda, doesn’t work to extension methods when to use? reflection late binding methods COM code examples

  Late binding example – 2 examples – with dynamic … Continue reading →

Posted in C# | Comments Off on C#. Dynamic

C#. Context free and context bounded types

Process includes domain Domain includes context Example

 

Posted in C# | Comments Off on C#. Context free and context bounded types

C#. Domain. SimpleExamples

Examples shows -Display domain stats -List assemblies in domain -List assemblies in domain through LINQ -EventHandling of assembly loading -Load Unload Assemblies, HandlingEvents

 

Posted in C# | Comments Off on C#. Domain. SimpleExamples

С#. Domains. Processes. Threads

Domain – container for processes. Domain include processes. It is .NET technology – to make work more safety, also for multiPlatforms, more efficient with resources consumption. Process – running program, container for threads. It has PID. Thread – way of … Continue reading →

Posted in C# | Comments Off on С#. Domains. Processes. Threads

С#. Attributes. Practice

This example shows -reading attributes -initialize object in dependence of attributes value -reading attributes from class and from properties -early binding / late binding examples -iteration through types

Numbers

CarLib

 

Posted in C# | Comments Off on С#. Attributes. Practice

C#. Attributes

Definition Attributes – descendants of System.Attribute, some kind of annotations of code, applied for some object. Standart attributes are [CLSCompliant] – Common Language Specification [DLLImport] [Obsolete] – deprecated [Serializable] [NonSerialized] [WebMethod] Self made attributes also possible Attribute consumers Compiler, some … Continue reading →

Posted in C# | Comments Off on C#. Attributes

С#. LateBindingExamples

Late binding means – we can create instance not in compilation time but in execution and call methods with or without params -invoke methods with / without params -setting private fields

 

Posted in C# | Comments Off on С#. LateBindingExamples

C#. Dynamically loaded assembly

Load and LoadFrom commands…

This will give

 

Posted in C# | Comments Off on C#. Dynamically loaded assembly

C#. Reflection

Reflection – getting info about type during execution.

#1 Need instance and info about type, before getting type

#2 Need info about type before getting type

#3 in current assembly with string param

#4 in external … Continue reading →

Posted in C# | Comments Off on C#. Reflection