Explore
Explore snippets
Discover reusable code snippets, examples, fixes, and ideas shared by developers, students, and teams.
Public snippets by CodShot user
Popular tags:
#beadando
3 public snippets
C#
Public
Singleton Pattern in C#
Defines a singleton class with a static instance method ensuring a single object and a method returning a fixed integer.
C#
Preview
namespace HF10
{
internal class S : ISize
{
private static S instance = null;
private S()
{
}
public static S Instance()
{
if (instance == null)
{
#beadando
C#
Public
Center.cs
C#
Preview
using System;
using System.Collections.Generic;
namespace HF07
{
internal class Center
{
private List<Bank> bankok;
public Center(List<Bank> bankok)
{
this.bankok = bankok;
}
C#
Public
ATM.cs
C#
Preview
using System;
namespace HF07
{
internal class ATM
{
private string location;
private Center center;
public ATM(string location, Center center)
{
this.location = location;
this.center = center;