Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added demo file io and demo delegate #63

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added CS_DemoDelegate/.vs/CS_DemoDelegate/v16/.suo
Binary file not shown.
31 changes: 31 additions & 0 deletions CS_DemoDelegate/CS_DemoDelegate.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31205.134
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CS_DemoDelegate", "CS_DemoDelegate\CS_DemoDelegate.csproj", "{10E34269-D00D-4EFC-A4A3-FA05640880D3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoLab", "DemoLab\DemoLab.csproj", "{3DB56E6B-40C4-49F0-A3A2-24D3977C17CE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{10E34269-D00D-4EFC-A4A3-FA05640880D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{10E34269-D00D-4EFC-A4A3-FA05640880D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{10E34269-D00D-4EFC-A4A3-FA05640880D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{10E34269-D00D-4EFC-A4A3-FA05640880D3}.Release|Any CPU.Build.0 = Release|Any CPU
{3DB56E6B-40C4-49F0-A3A2-24D3977C17CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3DB56E6B-40C4-49F0-A3A2-24D3977C17CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3DB56E6B-40C4-49F0-A3A2-24D3977C17CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3DB56E6B-40C4-49F0-A3A2-24D3977C17CE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9A748331-C652-4A74-AA4B-D867D0DC9D00}
EndGlobalSection
EndGlobal
6 changes: 6 additions & 0 deletions CS_DemoDelegate/CS_DemoDelegate/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
</configuration>
59 changes: 59 additions & 0 deletions CS_DemoDelegate/CS_DemoDelegate/CS_DemoDelegate.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{10E34269-D00D-4EFC-A4A3-FA05640880D3}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>CS_DemoDelegate</RootNamespace>
<AssemblyName>CS_DemoDelegate</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DemoLab\DemoLab.csproj">
<Project>{3db56e6b-40c4-49f0-a3a2-24d3977c17ce}</Project>
<Name>DemoLab</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
32 changes: 32 additions & 0 deletions CS_DemoDelegate/CS_DemoDelegate/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using System;
using DemoLab;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CS_DemoDelegate
{
class Myclass
{



public void Process(string data)
{
Console.WriteLine($"{data}! from prcess()!");
}
}
class Program
{
static void Main(string[] args)
{
Demo d = new Demo();
Myclass c = new Myclass();
CallBackDelegate cb = new CallBackDelegate(c.Process);
d.DoSomething(cb);

Console.ReadKey();
}
}
}
36 changes: 36 additions & 0 deletions CS_DemoDelegate/CS_DemoDelegate/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CS_DemoDelegate")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CS_DemoDelegate")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("10e34269-d00d-4efc-a4a3-fa05640880d3")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
</configuration>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8227bef1327ab62ebfb6b12b632e370618ffb75a
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
C:\Users\Rajat Kumar\Desktop\Demo c#\CS_DemoDelegate\CS_DemoDelegate\obj\Debug\CS_DemoDelegate.csproj.CoreCompileInputs.cache
C:\Users\Rajat Kumar\Desktop\Demo c#\CS_DemoDelegate\CS_DemoDelegate\bin\Debug\CS_DemoDelegate.exe.config
C:\Users\Rajat Kumar\Desktop\Demo c#\CS_DemoDelegate\CS_DemoDelegate\bin\Debug\CS_DemoDelegate.exe
C:\Users\Rajat Kumar\Desktop\Demo c#\CS_DemoDelegate\CS_DemoDelegate\bin\Debug\CS_DemoDelegate.pdb
C:\Users\Rajat Kumar\Desktop\Demo c#\CS_DemoDelegate\CS_DemoDelegate\bin\Debug\DemoLab.dll
C:\Users\Rajat Kumar\Desktop\Demo c#\CS_DemoDelegate\CS_DemoDelegate\bin\Debug\DemoLab.pdb
C:\Users\Rajat Kumar\Desktop\Demo c#\CS_DemoDelegate\CS_DemoDelegate\obj\Debug\CS_DemoDelegate.csprojAssemblyReference.cache
C:\Users\Rajat Kumar\Desktop\Demo c#\CS_DemoDelegate\CS_DemoDelegate\obj\Debug\CS_DemoDelegate.csproj.CopyComplete
C:\Users\Rajat Kumar\Desktop\Demo c#\CS_DemoDelegate\CS_DemoDelegate\obj\Debug\CS_DemoDelegate.exe
C:\Users\Rajat Kumar\Desktop\Demo c#\CS_DemoDelegate\CS_DemoDelegate\obj\Debug\CS_DemoDelegate.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
12 changes: 12 additions & 0 deletions CS_DemoDelegate/DemoLab/CallBackDelegate
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DemoLab
{
public class Class1
{
}
}
12 changes: 12 additions & 0 deletions CS_DemoDelegate/DemoLab/CallBackDelegate.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DemoLab
{
public delegate void CallBackDelegate(string input);


}
21 changes: 21 additions & 0 deletions CS_DemoDelegate/DemoLab/Demo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using DemoLab;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DemoLab
{
public class Demo
{
public void DoSomething(CallBackDelegate callBack)
{
Console.WriteLine("hello from DoSomething()!");
callBack?.Invoke("hello world!");
Console.WriteLine("DoSomething() Ending!");

}

}
}
50 changes: 50 additions & 0 deletions CS_DemoDelegate/DemoLab/DemoLab.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{3DB56E6B-40C4-49F0-A3A2-24D3977C17CE}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DemoLab</RootNamespace>
<AssemblyName>DemoLab</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<None Include="CallBackDelegate" />
<Compile Include="CallBackDelegate.cs" />
<Compile Include="Demo.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
36 changes: 36 additions & 0 deletions CS_DemoDelegate/DemoLab/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("DemoLab")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DemoLab")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("3db56e6b-40c4-49f0-a3a2-24d3977c17ce")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Binary file added CS_DemoDelegate/DemoLab/bin/Debug/DemoLab.dll
Binary file not shown.
Binary file added CS_DemoDelegate/DemoLab/bin/Debug/DemoLab.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9bd260d265e2ab9aa65c327d0bea5c97c328e88d
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
C:\Users\Rajat Kumar\Desktop\Demo c#\CS_DemoDelegate\DemoLab\obj\Debug\DemoLab.csprojAssemblyReference.cache
C:\Users\Rajat Kumar\Desktop\Demo c#\CS_DemoDelegate\DemoLab\obj\Debug\DemoLab.csproj.CoreCompileInputs.cache
C:\Users\Rajat Kumar\Desktop\Demo c#\CS_DemoDelegate\DemoLab\bin\Debug\DemoLab.dll
C:\Users\Rajat Kumar\Desktop\Demo c#\CS_DemoDelegate\DemoLab\bin\Debug\DemoLab.pdb
C:\Users\Rajat Kumar\Desktop\Demo c#\CS_DemoDelegate\DemoLab\obj\Debug\DemoLab.dll
C:\Users\Rajat Kumar\Desktop\Demo c#\CS_DemoDelegate\DemoLab\obj\Debug\DemoLab.pdb
Binary file not shown.
Binary file added CS_DemoDelegate/DemoLab/obj/Debug/DemoLab.dll
Binary file not shown.
Binary file added CS_DemoDelegate/DemoLab/obj/Debug/DemoLab.pdb
Binary file not shown.
Binary file not shown.
Binary file added CS_DemoFileIO/.vs/CS_DemoFileIO/v16/.suo
Binary file not shown.
25 changes: 25 additions & 0 deletions CS_DemoFileIO/CS_DemoFileIO.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31205.134
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CS_DemoFileIO", "CS_DemoFileIO\CS_DemoFileIO.csproj", "{FCB81E7E-5A10-49C6-A588-6AD9ECDD35B1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FCB81E7E-5A10-49C6-A588-6AD9ECDD35B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FCB81E7E-5A10-49C6-A588-6AD9ECDD35B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FCB81E7E-5A10-49C6-A588-6AD9ECDD35B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FCB81E7E-5A10-49C6-A588-6AD9ECDD35B1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F65FBF5F-CADC-4384-A81D-DD329E93A98A}
EndGlobalSection
EndGlobal
6 changes: 6 additions & 0 deletions CS_DemoFileIO/CS_DemoFileIO/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
</configuration>
Loading