asd
This commit is contained in:
parent
c59f7fe309
commit
b62deda57c
Binary file not shown.
Binary file not shown.
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
"Version": 1,
|
"Version": 1,
|
||||||
"WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20240911\\ConsoleApp1\\",
|
"WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20240911\\ConsoleApp1\\",
|
||||||
"Documents": [
|
"Documents": [
|
||||||
{
|
{
|
||||||
"AbsoluteMoniker": "D:0:0:{739297EA-E8FF-4D27-9F53-10E374FBB642}|ConsoleApp1\\ConsoleApp1.csproj|c:\\users\\szabomarton\\desktop\\c#\\progaora\\20240911\\consoleapp1\\consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
"AbsoluteMoniker": "D:0:0:{739297EA-E8FF-4D27-9F53-10E374FBB642}|ConsoleApp1\\ConsoleApp1.csproj|c:\\users\\szabomarton\\desktop\\progaora\\20240911\\consoleapp1\\consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||||
"RelativeMoniker": "D:0:0:{739297EA-E8FF-4D27-9F53-10E374FBB642}|ConsoleApp1\\ConsoleApp1.csproj|solutionrelative:consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
"RelativeMoniker": "D:0:0:{739297EA-E8FF-4D27-9F53-10E374FBB642}|ConsoleApp1\\ConsoleApp1.csproj|solutionrelative:consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -20,11 +20,11 @@
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 0,
|
"DocumentIndex": 0,
|
||||||
"Title": "Program.cs",
|
"Title": "Program.cs",
|
||||||
"DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20240911\\ConsoleApp1\\ConsoleApp1\\Program.cs",
|
"DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20240911\\ConsoleApp1\\ConsoleApp1\\Program.cs",
|
||||||
"RelativeDocumentMoniker": "ConsoleApp1\\Program.cs",
|
"RelativeDocumentMoniker": "ConsoleApp1\\Program.cs",
|
||||||
"ToolTip": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20240911\\ConsoleApp1\\ConsoleApp1\\Program.cs",
|
"ToolTip": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20240911\\ConsoleApp1\\ConsoleApp1\\Program.cs",
|
||||||
"RelativeToolTip": "ConsoleApp1\\Program.cs",
|
"RelativeToolTip": "ConsoleApp1\\Program.cs",
|
||||||
"ViewState": "AgIAAAMAAAAAAAAAAAAQwBwAAAAoAAAAAAAAAA==",
|
"ViewState": "AgIAACEAAAAAAAAAAAAkwCQAAAAiAAAAAAAAAA==",
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||||
"WhenOpened": "2024-09-11T10:02:46.053Z",
|
"WhenOpened": "2024-09-11T10:02:46.053Z",
|
||||||
"EditorCaption": ""
|
"EditorCaption": ""
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
"Version": 1,
|
"Version": 1,
|
||||||
"WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20240911\\ConsoleApp1\\",
|
"WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20240911\\ConsoleApp1\\",
|
||||||
"Documents": [
|
"Documents": [
|
||||||
{
|
{
|
||||||
"AbsoluteMoniker": "D:0:0:{739297EA-E8FF-4D27-9F53-10E374FBB642}|ConsoleApp1\\ConsoleApp1.csproj|c:\\users\\szabomarton\\desktop\\c#\\progaora\\20240911\\consoleapp1\\consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
"AbsoluteMoniker": "D:0:0:{739297EA-E8FF-4D27-9F53-10E374FBB642}|ConsoleApp1\\ConsoleApp1.csproj|c:\\users\\szabomarton\\desktop\\progaora\\20240911\\consoleapp1\\consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||||
"RelativeMoniker": "D:0:0:{739297EA-E8FF-4D27-9F53-10E374FBB642}|ConsoleApp1\\ConsoleApp1.csproj|solutionrelative:consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
"RelativeMoniker": "D:0:0:{739297EA-E8FF-4D27-9F53-10E374FBB642}|ConsoleApp1\\ConsoleApp1.csproj|solutionrelative:consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -20,11 +20,11 @@
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 0,
|
"DocumentIndex": 0,
|
||||||
"Title": "Program.cs",
|
"Title": "Program.cs",
|
||||||
"DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20240911\\ConsoleApp1\\ConsoleApp1\\Program.cs",
|
"DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20240911\\ConsoleApp1\\ConsoleApp1\\Program.cs",
|
||||||
"RelativeDocumentMoniker": "ConsoleApp1\\Program.cs",
|
"RelativeDocumentMoniker": "ConsoleApp1\\Program.cs",
|
||||||
"ToolTip": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20240911\\ConsoleApp1\\ConsoleApp1\\Program.cs",
|
"ToolTip": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20240911\\ConsoleApp1\\ConsoleApp1\\Program.cs",
|
||||||
"RelativeToolTip": "ConsoleApp1\\Program.cs",
|
"RelativeToolTip": "ConsoleApp1\\Program.cs",
|
||||||
"ViewState": "AgIAABQAAAAAAAAAAAAgwC4AAAAoAAAAAAAAAA==",
|
"ViewState": "AgIAACEAAAAAAAAAAAAkwCQAAAAiAAAAAAAAAA==",
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||||
"WhenOpened": "2024-09-11T10:02:46.053Z",
|
"WhenOpened": "2024-09-11T10:02:46.053Z",
|
||||||
"EditorCaption": ""
|
"EditorCaption": ""
|
||||||
|
|
|
@ -13,16 +13,42 @@ namespace ConsoleApp1
|
||||||
public int X { get; set; }
|
public int X { get; set; }
|
||||||
public int Y { get; set; }
|
public int Y { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct Betuk
|
||||||
|
{
|
||||||
|
public char X { get; set; }
|
||||||
|
public char Y { get; set; }
|
||||||
|
}
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
//Pelda1();
|
//Pelda1();
|
||||||
Pelda2();
|
//Pelda2();
|
||||||
|
Pelda3();
|
||||||
|
|
||||||
Console.ReadLine();
|
Console.ReadLine();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void Pelda3()
|
||||||
|
{
|
||||||
|
var elemek = new List<Betuk>
|
||||||
|
{
|
||||||
|
new Betuk { X = 'x', Y = 'c' },
|
||||||
|
new Betuk { X = 'b', Y = 'c' },
|
||||||
|
new Betuk { X = 'h', Y = 'c' },
|
||||||
|
new Betuk { X = 'g', Y = 'c' },
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
var eredmeny = from elem in elemek orderby elem.X ascending select elem.X;
|
||||||
|
|
||||||
|
foreach (var item in eredmeny)
|
||||||
|
{
|
||||||
|
Console.WriteLine(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void Pelda2()
|
static void Pelda2()
|
||||||
{
|
{
|
||||||
var elemek = new List<Koordinatak>
|
var elemek = new List<Koordinatak>
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -5,3 +5,10 @@ C:\Users\szabomarton\Desktop\C#\ProgaOra\20240911\ConsoleApp1\ConsoleApp1\bin\De
|
||||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20240911\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.pdb
|
C:\Users\szabomarton\Desktop\C#\ProgaOra\20240911\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.pdb
|
||||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20240911\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.exe
|
C:\Users\szabomarton\Desktop\C#\ProgaOra\20240911\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.exe
|
||||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20240911\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.pdb
|
C:\Users\szabomarton\Desktop\C#\ProgaOra\20240911\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.pdb
|
||||||
|
C:\Users\szabomarton\Desktop\ProgaOra\20240911\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.exe.config
|
||||||
|
C:\Users\szabomarton\Desktop\ProgaOra\20240911\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.exe
|
||||||
|
C:\Users\szabomarton\Desktop\ProgaOra\20240911\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.pdb
|
||||||
|
C:\Users\szabomarton\Desktop\ProgaOra\20240911\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.csproj.AssemblyReference.cache
|
||||||
|
C:\Users\szabomarton\Desktop\ProgaOra\20240911\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.csproj.CoreCompileInputs.cache
|
||||||
|
C:\Users\szabomarton\Desktop\ProgaOra\20240911\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.exe
|
||||||
|
C:\Users\szabomarton\Desktop\ProgaOra\20240911\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.pdb
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -10,4 +10,11 @@ A linq szintaxisai:
|
||||||
select elem.x;
|
select elem.x;
|
||||||
|
|
||||||
|
|
||||||
|
A sql utasítások közül a group by is használható.
|
||||||
|
|
||||||
|
Mint látható a rendezést az orderby kulcsszó valósítja meg,
|
||||||
|
amit a tulajdonság neve követ, ami alapján rendezni akarunk.
|
||||||
|
Ezután vagy az ascending, vagy a descending kulcsszónak kell következnie attól függően, hogy növekvő, vagy csökkenő sorrendben szeretnénk az adatokat kiírni. A lambda szintaxis esetén az OrderBy és az OrderByDescendinget alkalmazzuk.
|
||||||
|
|
||||||
|
Csoportosítás (good bye)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user