This file contains 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; | |
public sealed class SomeExpensiveResource | |
{ | |
private static readonly Lazy<SomeExpensiveResource> lazy = | |
new Lazy<SomeExpensiveResource>(() => new SomeExpensiveResource()); | |
public static SomeExpensiveResource Instance { get { return lazy.Value; } } | |
private SomeExpensiveResource() | |
{ |
This file contains 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; | |
namespace MultiThreadedProgramming | |
{ | |
class Account | |
{ | |
public Account() | |
{ | |
Balance = 0.00; |
This file contains 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; | |
namespace MultiThreadedProgramming | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Account Savings = new Account(); |
This file contains 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; | |
namespace MultiThreadedProgramming | |
{ | |
class Account | |
{ | |
public Account() | |
{ | |
Balance = 0.00; |
This file contains 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.Diagnostics; | |
namespace SortingArrays | |
{ | |
class BubbleSort | |
{ | |
public void Sort(int[] input) | |
{ | |
var watch = Stopwatch.StartNew(); |
This file contains 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.Diagnostics; | |
namespace SortingArrays | |
{ | |
class SelectionSort | |
{ | |
public void Sort(int[] input) | |
{ | |
var watch = Stopwatch.StartNew(); |
This file contains 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; | |
namespace SortingArrays | |
{ | |
class PrintArray | |
{ | |
public void PrintIntegerArray(int[] array) | |
{ | |
foreach (int i in array) | |
{ |
This file contains 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.Diagnostics; | |
namespace SortingArrays | |
{ | |
class InsertionSort | |
{ | |
public void Sort(int[] input) | |
{ | |
var watch = Stopwatch.StartNew(); |
This file contains 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 Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.Options; | |
using System.Collections.Generic; | |
using Theta.Customers.API.Configuration; | |
using Theta.Customers.Models; | |
using Theta.Customers.Repository; | |
This file contains 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 Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.DependencyInjection; | |
using Theta.Customers.API.Configuration; | |
namespace Theta.Customers.API | |
{ | |
public class Startup | |
{ |
NewerOlder