added orai

This commit is contained in:
szabomarton
2024-11-21 10:08:03 +01:00
parent 152126ad18
commit d802eb4b67
43 changed files with 469 additions and 18 deletions

Binary file not shown.

View File

@@ -0,0 +1,37 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20241121\\ConsoleApp1\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{B4808438-CC63-43F3-A06C-DF89A8AC84F8}|ConsoleApp1\\ConsoleApp1.csproj|c:\\users\\szabomarton\\desktop\\c#\\progaora\\20241121\\consoleapp1\\consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B4808438-CC63-43F3-A06C-DF89A8AC84F8}|ConsoleApp1\\ConsoleApp1.csproj|solutionrelative:consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 0,
"Children": [
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "Program.cs",
"DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20241121\\ConsoleApp1\\ConsoleApp1\\Program.cs",
"RelativeDocumentMoniker": "ConsoleApp1\\Program.cs",
"ToolTip": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20241121\\ConsoleApp1\\ConsoleApp1\\Program.cs",
"RelativeToolTip": "ConsoleApp1\\Program.cs",
"ViewState": "AgIAAHIAAAAAAAAAAAAAAIoAAAAyAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-11-21T07:02:57.923Z",
"EditorCaption": ""
}
]
}
]
}
]
}

View File

@@ -0,0 +1,37 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20241121\\ConsoleApp1\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{B4808438-CC63-43F3-A06C-DF89A8AC84F8}|ConsoleApp1\\ConsoleApp1.csproj|c:\\users\\szabomarton\\desktop\\c#\\progaora\\20241121\\consoleapp1\\consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B4808438-CC63-43F3-A06C-DF89A8AC84F8}|ConsoleApp1\\ConsoleApp1.csproj|solutionrelative:consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 0,
"Children": [
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "Program.cs",
"DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20241121\\ConsoleApp1\\ConsoleApp1\\Program.cs",
"RelativeDocumentMoniker": "ConsoleApp1\\Program.cs",
"ToolTip": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20241121\\ConsoleApp1\\ConsoleApp1\\Program.cs",
"RelativeToolTip": "ConsoleApp1\\Program.cs",
"ViewState": "AgIAAHIAAAAAAAAAAAAAAIoAAAAyAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-11-21T07:02:57.923Z",
"EditorCaption": ""
}
]
}
]
}
]
}

View File

@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.11.35222.181
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp1", "ConsoleApp1\ConsoleApp1.csproj", "{B4808438-CC63-43F3-A06C-DF89A8AC84F8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B4808438-CC63-43F3-A06C-DF89A8AC84F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B4808438-CC63-43F3-A06C-DF89A8AC84F8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B4808438-CC63-43F3-A06C-DF89A8AC84F8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B4808438-CC63-43F3-A06C-DF89A8AC84F8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C72894E5-7C74-4219-BED3-2B9F0ABB742A}
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

View File

@@ -0,0 +1,53 @@
<?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>{B4808438-CC63-43F3-A06C-DF89A8AC84F8}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>ConsoleApp1</RootNamespace>
<AssemblyName>ConsoleApp1</AssemblyName>
<TargetFrameworkVersion>v4.7.2</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>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,146 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
public class Csomopont
{
public int Adat { get; set; }
public Csomopont Kovetkezo { get; set; }
public Csomopont(int adat) {
this.Adat = adat;
Kovetkezo = null;
}
}
public class LancoltLista
{
private Csomopont fej;
public LancoltLista() {
fej = null;
}
public void Hozzaad(int adat) {
Csomopont ujcsomopont = new Csomopont(adat);
if (fej == null)
{
fej = ujcsomopont;
}
else
{
Csomopont jelenlegi = fej;
while (jelenlegi.Kovetkezo != null)
{
jelenlegi = jelenlegi.Kovetkezo;
}
jelenlegi.Kovetkezo = ujcsomopont;
}
}
public void Torol(int adat)
{
if (fej == null)
{
Console.WriteLine("A lista üres");
return;
}
if (fej.Adat == adat)
{
fej = fej.Kovetkezo;
return;
}
Csomopont jelenlegi = fej;
while(jelenlegi.Kovetkezo != null && jelenlegi.Kovetkezo.Adat != adat)
{
jelenlegi = jelenlegi .Kovetkezo;
}
if (jelenlegi.Kovetkezo == null)
{
Console.WriteLine("At elem nem található a listában.");
}
else {
jelenlegi.Kovetkezo = jelenlegi.Kovetkezo.Kovetkezo;
}
}
public void Kiir()
{
if (fej == null)
{
Console.WriteLine("A lista üres");
return;
}
Csomopont jelenlegi = fej;
while (jelenlegi != null)
{
Console.WriteLine(jelenlegi.Adat + " ");
jelenlegi = jelenlegi.Kovetkezo;
}
Console.WriteLine();
}
}
internal class Program
{
static void Main(string[] args)
{
LancoltLista lancoltLista = new LancoltLista();
lancoltLista.Hozzaad(10);
lancoltLista.Hozzaad(20);
lancoltLista.Hozzaad(30);
lancoltLista.Hozzaad(40);
Console.WriteLine("Lista elemei: ");
lancoltLista.Kiir();
Console.WriteLine("Elem törlése (20):");
lancoltLista.Torol(20);
lancoltLista.Kiir();
Console.WriteLine("Elem törlése (50):");
lancoltLista.Torol(50);
lancoltLista.Kiir();
//kétszeresen láncolt lista
LinkedList<string> láncoltlista = new LinkedList<string>();
láncoltlista.AddLast("vár");
láncoltlista.AddLast("kávé");
láncoltlista.AddLast("autó");
láncoltlista.AddFirst("asd");
láncoltlista.RemoveLast();
LinkedListNode<string> newNOde = new LinkedListNode<string>("value");
láncoltlista.AddAfter(láncoltlista.First, newNOde);
LinkedListNode<string> linkedListNode = láncoltlista.First;
//Console.WriteLine(linkedListNode.Value);
foreach (string s in láncoltlista) { Console.WriteLine(s); }
LinkedListNode<string> nodelast = láncoltlista.Last;
while (nodelast != null)
{
Console.WriteLine(nodelast.Value);
nodelast = nodelast.Previous;
}
Console.ReadLine();
}
}
}

View File

@@ -0,0 +1,33 @@
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("ConsoleApp1")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ConsoleApp1")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[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("b4808438-cc63-43f3-a06c-df89a8ac84f8")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

View File

@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]

View File

@@ -0,0 +1 @@
137ddb1975586287657f37337b64d051167bb6a147915d9fb5b8eb94b1093509

View File

@@ -0,0 +1,7 @@
C:\Users\szabomarton\Desktop\C#\ProgaOra\20241121\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.exe.config
C:\Users\szabomarton\Desktop\C#\ProgaOra\20241121\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.exe
C:\Users\szabomarton\Desktop\C#\ProgaOra\20241121\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.pdb
C:\Users\szabomarton\Desktop\C#\ProgaOra\20241121\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.csproj.AssemblyReference.cache
C:\Users\szabomarton\Desktop\C#\ProgaOra\20241121\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.csproj.CoreCompileInputs.cache
C:\Users\szabomarton\Desktop\C#\ProgaOra\20241121\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.exe
C:\Users\szabomarton\Desktop\C#\ProgaOra\20241121\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.pdb

BIN
20241121/Órai.pdf Normal file

Binary file not shown.