Commit 540692b9 authored by Uwe Wienkop's avatar Uwe Wienkop
Browse files

2020-06-16 Di

parent 7a9fcdb6
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>_09_DelegateVerkettung</RootNamespace>
</PropertyGroup>
</Project>
using System;
namespace _09_DelegateVerkettung
{
class Program
{
delegate void StringDelegate(ref string s);
static StringDelegate stringdelegate;
static string Ausgabe(string s)
{
stringdelegate?.Invoke(ref s);
return s;
//Console.WriteLine("------------");
}
static void InGrossbuchstaben(ref string s)
{
s = s.ToUpper();
}
static void AbZweitesZeichen(ref string s)
{
s= s.Substring(1);
}
static void Mitte(ref string s)
{
s = s.Substring(2, 3);
}
static void Main(string[] args)
{
StringDelegate tmp = delegate (ref string s) { s = s.Substring(1); };
stringdelegate += InGrossbuchstaben; // Ausführung in der Reihenfolge
stringdelegate += tmp;
// des +=
stringdelegate += Mitte;
stringdelegate -= tmp;
// Achtung!!! Anonyme Methoden können nicht entfernt werden
stringdelegate += AbZweitesZeichen;
Console.WriteLine(Ausgabe("Hallo-Welt"));
}
}
}
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v3.1",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v3.1": {
"09 DelegateVerkettung/1.0.0": {
"runtime": {
"09 DelegateVerkettung.dll": {}
}
}
}
},
"libraries": {
"09 DelegateVerkettung/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}
\ No newline at end of file
{
"runtimeOptions": {
"additionalProbingPaths": [
"C:\\Users\\wienkop\\.dotnet\\store\\|arch|\\|tfm|",
"C:\\Users\\wienkop\\.nuget\\packages"
]
}
}
\ No newline at end of file
{
"runtimeOptions": {
"tfm": "netcoreapp3.1",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "3.1.0"
}
}
}
\ No newline at end of file
{
"format": 1,
"restore": {
"C:\\Users\\wienkop\\source\\repos\\prog2-ss2020-wienkop\\09 DelegateVerkettung\\09 DelegateVerkettung.csproj": {}
},
"projects": {
"C:\\Users\\wienkop\\source\\repos\\prog2-ss2020-wienkop\\09 DelegateVerkettung\\09 DelegateVerkettung.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Users\\wienkop\\source\\repos\\prog2-ss2020-wienkop\\09 DelegateVerkettung\\09 DelegateVerkettung.csproj",
"projectName": "09 DelegateVerkettung",
"projectPath": "C:\\Users\\wienkop\\source\\repos\\prog2-ss2020-wienkop\\09 DelegateVerkettung\\09 DelegateVerkettung.csproj",
"packagesPath": "C:\\Users\\wienkop\\.nuget\\packages\\",
"outputPath": "C:\\Users\\wienkop\\source\\repos\\prog2-ss2020-wienkop\\09 DelegateVerkettung\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\wienkop\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"netcoreapp3.1"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"netcoreapp3.1": {
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"netcoreapp3.1": {
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.301\\RuntimeIdentifierGraph.json"
}
}
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\wienkop\.nuget\packages\</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.6.0</NuGetToolVersion>
</PropertyGroup>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
</Project>
\ No newline at end of file
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = "")]
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("09 DelegateVerkettung")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("09 DelegateVerkettung")]
[assembly: System.Reflection.AssemblyTitleAttribute("09 DelegateVerkettung")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Von der MSBuild WriteCodeFragment-Klasse generiert.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment