{"id":326,"date":"2025-10-17T06:49:11","date_gmt":"2025-10-17T06:49:11","guid":{"rendered":"https:\/\/informatika.tbg.hu\/?page_id=326"},"modified":"2025-10-17T07:10:16","modified_gmt":"2025-10-17T07:10:16","slug":"bekeres-alapok","status":"publish","type":"page","link":"https:\/\/informatika.tbg.hu\/index.php\/bekeres-alapok\/","title":{"rendered":"Bek\u00e9r\u00e9s (alapok)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Ezen az oldalon a billenty\u0171zetr\u0151l t\u00f6rt\u00e9n\u0151 bek\u00e9r\u00e9sr\u0151l lesz sz\u00f3. Az els\u0151dleges ki-\u00e9s bementi egys\u00e9geket (billenty\u0171zet, monitor) \u00f6sszefoglal\u00f3an konzolnak (Console) h\u00edvjuk.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A beolvas\u00e1s a parancsa a ReadLine(). Fontos megjegyezni, hogy -mivel egy f\u00fcggv\u00e9nyr\u0151l van sz\u00f3- a v\u00e9g\u00e9n a () z\u00e1r\u00f3jel p\u00e1ros K\u00d6TELEZ\u0150!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Amennyiben a billenty\u0171zetr\u0151l szeretn\u00e9nk adatokat beolvasni, akkor a <code><strong>Console.Readline()<\/strong><\/code> parancsot kell alkalmaznunk? <br>Mi t\u00f6rt\u00e9nik a parancs hat\u00e1s\u00e1ra? <br>A sz\u00e1m\u00edt\u00f3g\u00e9p beolvassa a karaktereket az Enter gomb lenyom\u00e1s\u00e1ig, \u00e9s elt\u00e1rolja azokat valahol a mem\u00f3ri\u00e1ban. Mivel nincs r\u00e1hat\u00e1ssal a felhaszn\u00e1l\u00f3ra, hogy az milyen t\u00edpus\u00fa adatokat \u00edr be, beolvas bet\u0171ket, sz\u00e1mokat jeleket, \u00f6sszefoglal\u00f3an karaktereket. Sz\u00e9pen sorban egym\u00e1s ut\u00e1n. Egy karakterl\u00e1ncolatot, vagyis stringet. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A <strong><code>Console.ReadLine()<\/code> parancs eredm\u00e9nye mindig string <strong>adatt\u00edpus<\/strong>\u00fa<\/strong>! <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Teh\u00e1t, ha szeretn\u00e9nk megtudni, hogy mit \u00edrt be a felhaszn\u00e1l\u00f3 , akkor azt a mem\u00f3riar\u00e9szt el kell nevezn\u00fcnk, l\u00e9tre kell hoznunk egy v\u00e1ltoz\u00f3t neki. N\u00e9vvel, \u00e9s adatt\u00edpussal. P\u00e9ld\u00e1ul:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>string bek\u00e9rtsz\u00f6veg=Console.ReadLine();<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/informatika.tbg.hu\/index.php\/bekeres-halado\/\" data-type=\"page\" data-id=\"330\">Tov\u00e1bb olvasom >>><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ezen az oldalon a billenty\u0171zetr\u0151l t\u00f6rt\u00e9n\u0151 bek\u00e9r\u00e9sr\u0151l lesz sz\u00f3. Az els\u0151dleges ki-\u00e9s bementi egys\u00e9geket (billenty\u0171zet, monitor) \u00f6sszefoglal\u00f3an konzolnak (Console) h\u00edvjuk. A beolvas\u00e1s a parancsa a ReadLine(). Fontos megjegyezni, hogy -mivel egy f\u00fcggv\u00e9nyr\u0151l van sz\u00f3- a v\u00e9g\u00e9n a () z\u00e1r\u00f3jel p\u00e1ros K\u00d6TELEZ\u0150! Amennyiben a billenty\u0171zetr\u0151l szeretn\u00e9nk adatokat beolvasni, akkor a Console.Readline() parancsot kell alkalmaznunk? Mi t\u00f6rt\u00e9nik [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-326","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/informatika.tbg.hu\/index.php\/wp-json\/wp\/v2\/pages\/326","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/informatika.tbg.hu\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/informatika.tbg.hu\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/informatika.tbg.hu\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/informatika.tbg.hu\/index.php\/wp-json\/wp\/v2\/comments?post=326"}],"version-history":[{"count":4,"href":"https:\/\/informatika.tbg.hu\/index.php\/wp-json\/wp\/v2\/pages\/326\/revisions"}],"predecessor-version":[{"id":332,"href":"https:\/\/informatika.tbg.hu\/index.php\/wp-json\/wp\/v2\/pages\/326\/revisions\/332"}],"wp:attachment":[{"href":"https:\/\/informatika.tbg.hu\/index.php\/wp-json\/wp\/v2\/media?parent=326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}