本文整理汇总了C#中Text.Copy方法的典型用法代码示例。如果您正苦于以下问题:C# Text.Copy方法的具体用法?C# Text.Copy怎么用?C# Text.Copy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Text
的用法示例。
在下文中一共展示了Text.Copy方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
/// <summary>
/// Inheritance (is-A relationship)and composition (has-A relationship) allows for code reuse.
/// Problems with inheritance: easy abuse by amateur devs, large hierarchies, fragility and tight code coupling.
/// Any inheritance relationship can be translated to composition, which has code flexibility and is loosely coupled.
/// </summary>
static void Main(string[] args)
{
// Inheritance in action
var text = new Text();
text.Width = 200;
text.Height = 500;
text.Copy();
// Composition in acton
var dbMigrator = new DbMigrator(new Logger());
var logger = new Logger();
var installer = new Installer(logger);
dbMigrator.Migrate();
installer.Install();
Console.ReadLine();
}
示例2: Main
static void Main(string[] args)
{
var text = new Text();
text.Width = 100;
text.Copy();
}