»Ë»Ñ Æ÷·³
°³¹ßÀÚÆ÷·³ ÀÔ´Ï´Ù.
  • ºÏ¸¶Å© ¾ÆÀÌÄÜ

linq±¸¹® custom Sort Áú¹®...8

  • [* ºñȸ¿ø *]
  • µî·ÏÀÏ 2016-09-04 17:54
  • Á¶È¸¼ö 550

¾È³çÇϼ¼¿ä Ãʺ¸Ãʺ¸ °³¹ßÀÚÀÔ´Ï´Ù.

 

¿äÁò ȸ»ç¿¡¼­ ERPºñ½º¹«¸®ÇѰŸ¦... ¹Þ¾Æ¼­ ÇÏ°íÀִµ¥

 

Á¤·Ä ¹®Á¦°¡ À־ Áú¹®Á» µå¸®°íÀÚ ±Û ½áº¾´Ï´Ù.

 

°³¹ß ȯ°æÀº visual studio 2015, asp.net, mvc, c# ÀÔ´Ï´Ù. À¥»çÀÌÆ®±¸¿ä

 

¹¹ ÀÌ°ÍÀú°Í °Çµå·Á¼­ ÇÏ°í ÀÖ±äÇѵ¥

 

sort ºÎºÐÀÌ ¹®Á¦°¡ Á» ÀÖ´õ¶ó±¸¿ä

 

¿¹¸¦µéÀÚ¸é ÀÌ·±°Ì´Ï´Ù.

 

var array = {"Naver","Daum","Youtube"}; ¶ó´Â ¹è¿­ÀÌ ÀÖÀ» ¶§ (½ÇÁ¦·Î´Â IQueryable<Ŭ·¡½º>ÀÔ´Ï´Ù)

 

*ÆíÀÇ»ó Naver, DaumºÎºÐÀÌ Ä«Å×°í¸®¶ó°í ÇÏ°Ú½À´Ï´Ù.

 

var data = array.orderby(a => a.Category);

 

ÇÏ¸é µ¥ÀÌÅÍ´Â Daum, Naver, Youtube ¼øÀ¸·Î Á¤·ÄµÉÅ×°í, decending ÇÏ¸é ¹Ý´ëÀÏÅÙµ¥¿ä

 

ÀÌ Á¤·Ä¼ø¼­¸¦ ƯÁ¤ ¸î Ç׸ñÀ» ¾ÕÀ¸·Î ¶¯±â°í, ³ª¸ÓÁö´Â ±×³É ¾ËÆĺª¼øÀ̳ª ÀÌ·±°É·Î ³ª¿À·Á°í ÇÕ´Ï´Ù.

 

Á»´õ ¸¹ÀÌ Àû¾îº¸ÀÚ¸é

 

var array = {"Naver","Daum","Youtube","Ppomppu","Google","Apple"};

 

ÀÌ·± µ¥ÀÌÅÍ°¡ ÀÖÀ» ¶§ ÃÖÁ¾ÀûÀÎ Ãâ·Â¹°ÀÌ

 

Ppomppu, Google, Naver, Apple, Daume, Youtube

 

ÀÌ·±½ÄÀ¸·Î array[0]ºÎÅÍ [2]±îÁö´Â ƯÁ¤ °ªÀ», ±× ÀÌÈĺÎÅÍ´Â ¾ËÆĺª¼ø ÀÌ·¸°Ô Á¤·ÄµÇ°Ô ÇÏ·Á°í Çϴµ¥¿ä

 

orderbyºÎºÐÀ» Ä¿½ºÅ͸¶ÀÌ¡ ÇÒ ¼ö°¡ ÀÖ³ª¿ä?? ±¸±Û¸µÇÏ¸é ¿øü ¹«½¼¸»ÀÎÁö ¸ð¸£°Ú³×¿ä;;

 

ÀÌ·¸°Ô ÇÏ·Á´Â ÀÌÀ¯´Â [0]ºÎÅÍ [2]±îÁö´Â °íÁ¤°ªÀÌ°í, ³ª¸ÓÁö´Â °¡º¯°ªÀ¸·Î °è¼Ó Ãß°¡µÇ°Å³ª ¸íĪº¯°æÀÌ ÀÖÀ»¼öµµ À־ ±×·¸½À´Ï´Ù ¤Ð

 

´Ù¸¥ ¹è¿­¿¡´Ù°¡ ¸î°³¸¸ ¹Ì¸® ÁöÁ¤Çسõ°í, °Å±â¿¡ ¸ÂÃç¼­ Çϸé ÁÁÀ»²¨°°Àºµ¥.. ¸Ó¸®¸¦ ±¼·ÁºÁµµ µµÀúÈ÷ »ý°¢ÀÌ ¾È³ª³×¿ä

 

Ȥ½Ã µµ¿ò ÁÖ½Ç ¼ö ÀÖÀ¸½ÅºÐ ºÎŹµå¸³´Ï´Ù ¤Ð

0
ÃßõÇϱ⠴ٸ¥ÀÇ°ß 0
|
°øÀ¯¹öÆ°

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 laserquest

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 [* ºñȸ¿ø *]

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 [* ºñȸ¿ø *]

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 º½-º½

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 ÇÚÆùÃʺ¸

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 ½½±â¿Õ

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 [* ºñȸ¿ø *]

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 ²¿²¿ÄÉÀÌ
  • ¾Ë¸² ¿å¼³, »óó ÁÙ ¼ö ÀÖ´Â ¾ÇÇÃÀº »ï°¡ÁÖ¼¼¿ä.
©¹æ »çÁø  
¡â ÀÌÀü±Û¡ä ´ÙÀ½±Û ¸ñ·Ïº¸±â