"Software should be made as simple as possible, but not simpler."


Microsoft .Net

.NET Framework introduced in 2001 is a software framework developed by Microsoft that runs primarily on Microsoft Windows. It includes a large class library named as Framework Class Library (FCL) and provides language interoperability (each language can use code written in other languages) across several programming languages. Programs written for .NET Framework execute in a software environment (in contrast to a hardware environment) named the Common Language Runtime (CLR). The CLR is an application virtual machine that provides services such as security, memory management, and exception handling. As such, computer code written using .NET Framework is called "managed code". FCL and CLR together constitute the .NET Framework.

The latest version of .Net is the .Net Core. This version has the same advantages of the original framework with the difference being that it will work on different platforms and not just Microsoft Windows such as Linux and macOS. Codewise, there is little difference from the original .Net Framework and older code written on the .Net Framework can be updated to run on .Net Core with minimal changes.

/// <summary> /// Get default mac address /// </summary> /// <returns>mac Address</returns> public static string DefaultAdapterMacAddress() { ManagementClass class2 = new ManagementClass("Win32_NetworkAdapter"); ManagementObjectSearcher searcher = new ManagementObjectSearcher(@"root\CIMV2", "SELECT InterfaceIndex, Destination FROM Win32_IP4RouteTable WHERE Destination='0.0.0.0'"); int num = 0; foreach (ManagementObject obj2 in searcher.Get()) { num = (int)obj2["InterfaceIndex"]; searcher.Dispose(); } searcher.Dispose(); string queryString = string.Format("SELECT * FROM Win32_NetworkAdapter WHERE InterfaceIndex={0}", num); searcher = new ManagementObjectSearcher(@"root\CIMV2", queryString); string str2 = null; foreach (ManagementObject obj2 in searcher.Get()) { str2 = (string)obj2["MACAddress"]; searcher.Dispose(); } return str2; }

Database

A database server, is a software product with the primary function of storing and retrieving data as requested by other software applications which may run either on the same computer or on another computer across a network (including the Internet).

SELECT e.first_name + ' ' + e.last_name employee, m.first_name + ' ' + m.last_name manager FROM sales.staffs e INNER JOIN sales.staffs m ON m.staff_id = e.manager_id ORDER BY manager;

Windows Presentation Foundation (XAML)

WPF represents a significant departure from the standard windows forms. WPF is more than just a next-generation presentation system for building Windows Client application along with visually stunning user interfaces, being multithreaded and feature rich.

<!--Button base--> <Style x:Key="BasicButtonStyle" TargetType="{x:Type Button}"> <Setter Property="FontSize" Value="18"/> <Setter Property="MinHeight" Value="75"/> <Setter Property="FontWeight" Value="Bold"/> <Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="Margin" Value="5,0,5,0"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Button}"> <Grid> <Border Style="{StaticResource BasicBorderStyle}" Background="{TemplateBinding Background}" CornerRadius="10"/> <TextBlock x:Name="ButtonText" Text="{TemplateBinding Content}" FontWeight="{TemplateBinding FontWeight}" FontSize="{TemplateBinding FontSize}" VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" Margin="10"> <TextBlock.Style> <Style TargetType="TextBlock"> <Setter Property="Foreground" Value="{StaticResource ForegroundColor}"/> <Style.Triggers> <Trigger Property="IsEnabled" Value="false"> <Setter Property="Foreground" Value="{StaticResource DisabledColor}"/> </Trigger> <Trigger Property="IsEnabled" Value="true"> <Setter Property="Foreground" Value="{StaticResource ForegroundColor}"/> </Trigger> </Style.Triggers> </Style> </TextBlock.Style> </TextBlock> </Grid> </ControlTemplate> </Setter.Value> </Setter> <Style.Triggers> <Trigger Property="IsEnabled" Value="false"> <Setter Property="Foreground" Value="DarkGray"/> </Trigger> <EventTrigger RoutedEvent="PreviewMouseDown"> <SoundPlayerAction Source="/Platform.Resources;component/Common/Click.wav"/> </EventTrigger> </Style.Triggers> </Style>

Entity Framework

The Entity Framework is an object-relational mapper that enables .NET developers to work with relational data using domain-specific objects, eliminating the need for most of the data-access code.

The basic operating principle is simple data tables are mapped to classes with columns and row being members of the classes. Access to Large relational databases will suffer speed degardation when using the entity framework as such it is better suited to small or medium size databases. Additional features of the framework is automatic synchronization with remote databases and making queries which is ideally suited to LINQ.