This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Threading; | |
| static class Program { | |
| static void Main() { | |
| Console.Write("Performing some task... "); | |
| using (var progress = new ProgressBar()) { | |
| for (int i = 0; i <= 100; i++) { | |
| progress.Report((double) i / 100); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| declare @testdata TABLE | |
| ( | |
| id int, | |
| string nvarchar(max) | |
| ) | |
| insert @testdata select 1, 'test test blah' | |
| insert @testdata select 2, 'east west' | |
| insert @testdata select 3, 'no way' | |
| insert @testdata select 4, '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public partial class Employee | |
| { | |
| // These fields come from the “Employee” table | |
| public int EmployeeId { get; set; } | |
| public string Code { get; set; } | |
| public string Name { get; set; } | |
| // These fields come from the “EmployeeDetails” table | |
| public string PhoneNumber { get; set; } | |
| public string EmailAddress { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use [table_name] | |
| declare @table TABLE(SQL_Server_data_type nvarchar(50) null, CLR_data_type_SQL_Server nvarchar(50) null, CLR_data_type_NET_Framework nvarchar(50) null) | |
| insert into @table(SQL_Server_data_type, CLR_data_type_SQL_Server, CLR_data_type_NET_Framework) values | |
| ('varbinary','SqlBytes, SqlBinary','byte[]'), | |
| ('binary','SqlBytes, SqlBinary','byte[]'), | |
| ('varbinary(1), binary(1)',' SqlBytes, SqlBinary','byte, byte[]'), | |
| ('image',null,'byte[]'), | |
| ('varchar',null,'string'), |