sheng-jie / design-pattern Goto Github PK
View Code? Open in Web Editor NEW设计模式 C# 版( .NET 6),有系列文章讲解
设计模式 C# 版( .NET 6),有系列文章讲解
此處的型別應該是string
經測試,使用int會出例外狀況
Design-Pattern/IteratorPattern/Program.cs
Line 19 in 5ae4ecc
因為ConcreteList內部的_collection是string陣列
真棒哈~
间接访问,非『代理模式』莫属 的链接没有了,访问不了
Lazy 是线程安全的,可以利用Lazy很简单的实现单例模式
public class Singleton
{
private static readonly Lazy<Singleton> singletonLazy = new Lazy<Singleton>(() => new Singleton());
public static Singleton Instance => singletonLazy.Value;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.