C# >
IO
IO allow reading and writing to files and data streams, and types that provide basic file and directory support.
Directory class
Path methods
IO
Examples:
C# >
Types >
String
String type represents a sequence of Unicode characters and is a reference type.
Methods
Example:
string a = "Hello";
string b = " world";
// Append ! to contents of b
b += "!";
MessageBox.Show (a + b);
C# is modern, multi-paradigm, strongly-typed, object oriented and high level programming language.
C# is an elegant language that enables you to build a variety of secure and robust applications that run on the .NET Framework. With C# you can create Windows client or Web applications, XML Web services, distributed components, client-server applications, database applications, etc.
The language of C# is very easy for anyone familiar with C, C++ or Java.
System
C# > Reflection
Reflection offers the possibility to describe assemblies, modules and types. It enables you to access the attributes.
A compiled C# program is a relational database called metadata.
Example:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace csharp
{
public partial class Form1 : Form
{
public static int mNumber = 10;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
Type objType = typeof(Form1);
FieldInfo field = objType.GetField("mNumber");
object objValue = field.GetValue(null);
MessageBox.Show(objValue.ToString());
}
}
}
SQL Server > Linked Server
A linked server allows the SQL Server Database Engine to execute commands against OLE DB data sources.
Linked servers are configured to enable the Database Engine to execute a Transact-SQL statement to another instance of SQL Server or another database such as Oracle.
OLE DB data sources can be configured as linked servers like Microsoft Access and Excel.
Advantages:
- access data from outside of SQL Server.
- execute distributed commands( queries updates, transaction) to heterogeneous data sources
Examples:
Add Microsoft Access as linked server
Microsoft SQL Server is a relational database management system developed by Microsoft.
SQL Server supports ANSI SQL, the standard SQL language like all major RBDMS.
SQL Server contains own SQL implementation named T-SQL.
SQL Server Management Studio (SSMS) is SQL Server interface tool.
SQL Server >
sys.objects >
Last modified stored procedures
Example
declare @nmb_days int = 10
SELECT * FROM sys.objects
WHERE TYPE = 'P'
AND DATEDIFF(D,modify_date, GETDATE()) < @nmb_days