Microsoft MVP성태의 닷넷 이야기
.NET : 104. 배열 원소 비교 [링크 복사], [링크+제목 복사],
조회: 19125
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 


배열 원소 비교


마침 2개의 바이트 배열을 비교해야 할 일이 있었습니다. 그런데, 왠지 for 루프를 돌면서 일일이 비교하는 것은 구식(?)방법 같아 보여서 검색을 해보았습니다. 근데,,, 그다지 딱히 좋은 방법이 나오지 않다가 저와 같이 동일한 고민을 하는 글을 보게 되었습니다.

Tatham Oddie - Comparing byte arrays in C#, or at least, trying to …
; http://blog.tatham.oddie.com.au/2008/07/01/comparing-byte-arrays-in-c-or-at-least-trying-to/

아쉽게도 고민만 했을 뿐 해결책이 없는 글이었습니다. ^^;

오호... 그런데 댓글을 보니 답이 떡하니 있습니다.

"RichB" 라는 사람의 댓글에,

From System.Linq:

Enumerable.SequenceEqual();

or

Console.WriteLine(new byte[] {1,2,3}.SequenceEqual(new byte[] {1,2,3}));

역시... System.Linq는 훌륭합니다. ^^







[최초 등록일: ]
[최종 수정일: 5/21/2009]


비밀번호

댓글 작성자
 




... 31  32  33  34  35  36  37  38  39  40  41  [42]  43  44  45  ...
NoWriterDateCnt.TitleFile(s)
134정성태11/15/200510703Microsoft SQL Server Management Studio Express - Community Technical Preview (CTP) November 2005 [1]
242정성태4/19/200611069    답변글 정식 릴리스 - Microsoft SQL Server Management Studio Express
243정성태4/19/200610347    답변글 Microsoft SQL Server 2005 Express Edition Toolkit
245정성태4/19/200610849    답변글 Microsoft SQL Server 2005 Express Edition Service Pack 1
133정성태10/30/200510895VS.NET TS 버전을 제외하고 전부 나왔습니다. ^^
132정성태10/28/200511103IE Script 에서 ADO.Stream 개체를 사용 허가 유무를 지정.
131정성태10/27/200510549ASP.NET Spiced: AJAX
130정성태10/26/200512065RSA In JavaScript [1]파일 다운로드1
128정성태10/25/200510724Connecting to MS SQL Server from Unix파일 다운로드1
129정성태10/25/200510529    답변글 [추가]: SQL Server 2005 JDBC Driver Beta 2 Now Available
173정성태1/20/200610324        답변글 정식 릴리스: Microsoft SQL Server 2005 JDBC Driver
127정성태10/21/20051080564-bit Windows ; 언제, 그리고 왜 써야 할까?
126정성태10/19/200511252WSE(Web Services Enhancements) 3.0의 새로운 기능
125정성태10/14/200511185Cluster 가능한 StateServer 세션 관리자
124정성태10/14/200511313MapPoint Web Service SDK Version 4.0 for Visual Studio .NET 2003
123정성태10/14/200510987alpha release of the Python programming language for the .NET platform
161정성태1/3/200610956    답변글 [추가]: Beta release
184정성태8/12/200611482    답변글 Beta3 까지. ^^
190정성태3/10/200610846    답변글 Beta 4
221정성태3/31/200611063    답변글 Beta 5
246정성태4/21/200610965    답변글 Beta 6
295정성태5/24/200610051    답변글 Beta 7
122정성태10/13/200510833Determine whether service packs are installed on the .NET Framework
121정성태10/12/200510384.NET Reference Guide - 웹
120정성태11/14/200510917VS.NET Automation 과 VSIP
119정성태10/9/200510494Internet Information Services (IIS) 6.0 Resource Kit Tools (English)
... 31  32  33  34  35  36  37  38  39  40  41  [42]  43  44  45  ...