diff --git a/dotNET/practical/practical-01/Program.cs b/dotNET/practical/practical-01/Program.cs new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/dotNET/practical/practical-01/Program.cs @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dotNET/practical/practical-01/practical-01.csproj b/dotNET/practical/practical-01/practical-01.csproj new file mode 100644 index 0000000..46286c9 --- /dev/null +++ b/dotNET/practical/practical-01/practical-01.csproj @@ -0,0 +1,11 @@ + + + + Exe + net8.0 + practical_01 + enable + enable + + + diff --git a/dotNET/practical/practical-01/practical-01.sln b/dotNET/practical/practical-01/practical-01.sln new file mode 100644 index 0000000..9c90495 --- /dev/null +++ b/dotNET/practical/practical-01/practical-01.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.12.35323.107 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "practical-01", "practical-01.csproj", "{7453CE89-9890-4239-978B-5D015A258709}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7453CE89-9890-4239-978B-5D015A258709}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7453CE89-9890-4239-978B-5D015A258709}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7453CE89-9890-4239-978B-5D015A258709}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7453CE89-9890-4239-978B-5D015A258709}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {081D5BAF-0BAE-4EAC-A7CE-FCD1A65F8F10} + EndGlobalSection +EndGlobal diff --git a/dotNET/theory/interface/interfaceEg/Program.cs b/dotNET/theory/interface/interfaceEg/Program.cs new file mode 100644 index 0000000..9d6896d --- /dev/null +++ b/dotNET/theory/interface/interfaceEg/Program.cs @@ -0,0 +1,67 @@ +// from A to B and C + +interface iUser +{ + void getDetails(string x); +} + +class User : iUser +{ + public void getDetails(string name) + { + Console.WriteLine("My name is {0}", name); + } +} + +class User2 : iUser +{ + public void getDetails(string address) + { + Console.WriteLine("My address is {0}", address); + } +} + +class Program +{ + static void Main() + { + iUser u = new User(); + u.getDetails("John Doe"); + + iUser u2 = new User2(); + u2.getDetails("123 Main St"); + } +} + +// from A and B to C +interface iUser +{ + void getName(string x); +} + +interface iAddress +{ + void getAddress(string a); +} + +class User : iUser, iAddress +{ + public void getName(string name) + { + Console.WriteLine("My name is {0}", name); + } + public void getAddress(string address) + { + Console.WriteLine("My address is {0}", address); + } +} + +class Program +{ + static void Main() + { + User u = new User(); + u.getName("John Doe"); + u.getAddress("123 Main St"); + } +} \ No newline at end of file diff --git a/dotNET/theory/interface/interfaceEg/interfaceEg.csproj b/dotNET/theory/interface/interfaceEg/interfaceEg.csproj new file mode 100644 index 0000000..2150e37 --- /dev/null +++ b/dotNET/theory/interface/interfaceEg/interfaceEg.csproj @@ -0,0 +1,10 @@ + + + + Exe + net8.0 + enable + enable + + + diff --git a/dotNET/theory/interface/interfaceEg/interfaceEg.sln b/dotNET/theory/interface/interfaceEg/interfaceEg.sln new file mode 100644 index 0000000..7ae6af3 --- /dev/null +++ b/dotNET/theory/interface/interfaceEg/interfaceEg.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.12.35323.107 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "interfaceEg", "interfaceEg.csproj", "{DACE2A75-8794-4CFE-9D51-EDFB6EDF83E6}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DACE2A75-8794-4CFE-9D51-EDFB6EDF83E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DACE2A75-8794-4CFE-9D51-EDFB6EDF83E6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DACE2A75-8794-4CFE-9D51-EDFB6EDF83E6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DACE2A75-8794-4CFE-9D51-EDFB6EDF83E6}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D4A1F73A-68EB-4F0C-9BCF-B0C83FE6D132} + EndGlobalSection +EndGlobal diff --git a/dotNET/theory/BCA.cs b/dotNET/theory/main/BCA.cs similarity index 100% rename from dotNET/theory/BCA.cs rename to dotNET/theory/main/BCA.cs diff --git a/dotNET/theory/Program.cs b/dotNET/theory/main/Program.cs similarity index 100% rename from dotNET/theory/Program.cs rename to dotNET/theory/main/Program.cs diff --git a/dotNET/theory/arithOperations.cs b/dotNET/theory/main/arithOperations.cs similarity index 100% rename from dotNET/theory/arithOperations.cs rename to dotNET/theory/main/arithOperations.cs diff --git a/dotNET/theory/bitwiseOperations.cs b/dotNET/theory/main/bitwiseOperations.cs similarity index 100% rename from dotNET/theory/bitwiseOperations.cs rename to dotNET/theory/main/bitwiseOperations.cs diff --git a/dotNET/theory/dotNET.csproj b/dotNET/theory/main/dotNET.csproj similarity index 100% rename from dotNET/theory/dotNET.csproj rename to dotNET/theory/main/dotNET.csproj diff --git a/dotNET/theory/dotNET.sln b/dotNET/theory/main/dotNET.sln similarity index 100% rename from dotNET/theory/dotNET.sln rename to dotNET/theory/main/dotNET.sln