dnsmail-cvs Mailing List for DnsMail (Page 3)
Brought to you by:
ethem
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(7) |
Apr
(1) |
May
(72) |
Jun
(22) |
Jul
(4) |
Aug
(52) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
---|
From: Ethem E. <et...@us...> - 2006-08-03 16:34:07
|
Update of /cvsroot/dnsmail/dnsmail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv3858/dnsmail Modified Files: Tag: DNSMAIL_02 MIME.cs Log Message: Some optimisation. Index: MIME.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/MIME.cs,v retrieving revision 1.1 retrieving revision 1.1.8.1 diff -C2 -d -r1.1 -r1.1.8.1 *** MIME.cs 2 Mar 2006 16:26:54 -0000 1.1 --- MIME.cs 3 Aug 2006 16:34:00 -0000 1.1.8.1 *************** *** 123,127 **** #endregion - #region QPEncode public static byte[] QPEncode(byte[] originalBuffer) --- 123,126 ---- *************** *** 221,290 **** public static byte[] QPDecode(byte[] decodedBuffer) { ! if (decodedBuffer == null) ! return null; ! ! int buflen = decodedBuffer.Length; ! MemoryStream ms = new MemoryStream(); ! byte[] token = new byte[3]; ! int tokenLength = 0, i = 0, j; ! try { ! for(byte b,c,n1,n2; i < buflen; ) { ! if (tokenLength == 0) { ! j = i; ! while(i<buflen && decodemap[decodedBuffer[i]]!=DESC)i++; ! if (i!=j)ms.Write(decodedBuffer,j,i-j); ! if (i>=buflen)break; ! } ! b = decodedBuffer[i++]; ! c = decodemap[b]; ! ! token[tokenLength++] = b; ! ! if (tokenLength != 3) ! continue; ! ! tokenLength ^= tokenLength; // set 0 ! ! // assert (decodemap[token[0]] == DESC) ! n1 = decodemap[token[1]]; ! n2 = decodemap[token[2]]; ! if (n1 == DCR || n1 == DLF) ! { // "=\r", "=\n", or "=\r\n" ! if (n1 == DLF || n2 != DLF) { ! if (n2 == DESC) ! { ! token[0] = token[2]; ! tokenLength = 1; ! } else ! ms.WriteByte(token[2]); } ! } ! else if (n1 <= 15 || n2 <= 15) ! ms.WriteByte((byte)((n1 << 4) | n2)); ! else ! ms.Write(token, 0, token.Length); } - byte[] ret = ms.ToArray(); - return ret; - } - catch - { - return null; - } - finally - { - ms.SetLength(0L); - ms.Capacity=0; - ms.Close(); - ms=null; } } #endregion --- 220,298 ---- public static byte[] QPDecode(byte[] decodedBuffer) { ! byte[] ret = null; ! if (decodedBuffer != null) { ! int buflen = decodedBuffer.Length; ! MemoryStream ms = new MemoryStream(); ! byte[] token = new byte[3]; ! int tokenLength = 0, i = 0; ! try { ! while (i < buflen) { ! if (tokenLength == 0) ! { ! int j = i; ! while (i < buflen && decodemap[decodedBuffer[i]] != DESC) ! i++; ! if (i != j) ! ms.Write(decodedBuffer, j, i - j); ! if (i >= buflen) ! break; ! } ! byte b = decodedBuffer[i++]; ! byte c = decodemap[b]; ! token[tokenLength++] = b; ! if (tokenLength == 3) { ! tokenLength ^= tokenLength; ! // assert (decodemap[token[0]] == DESC) ! byte n1 = decodemap[token[1]]; ! byte n2 = decodemap[token[2]]; ! if (n1 == DCR || n1 == DLF) ! { // "=\r", "=\n", or "=\r\n" ! if (n1 == DLF || n2 != DLF) ! { ! if (n2 == DESC) ! { ! token[0] = token[2]; ! tokenLength = 1; ! } ! else ! { ! ms.WriteByte(token[2]); ! } ! } ! } else ! { ! if (n1 <= 15 || n2 <= 15) ! { ! ms.WriteByte((byte)((n1 << 4) | n2)); ! continue; ! } ! ms.Write(token, 0, token.Length); ! } } ! } ! ret = ms.ToArray(); ! } ! catch ! { ! ret = null; ! } ! finally ! { ! ms.SetLength(0L); ! ms.Capacity=0; ! ms.Close(); ! ms=null; } } + return ret; + } #endregion |
From: Ethem E. <et...@us...> - 2006-08-02 17:06:18
|
Update of /cvsroot/dnsmail/dnsmail/DnsMail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv30321/dnsmail/DnsMail Modified Files: Tag: DNSMAIL_02 DnsMail.cs Log Message: Some optimisation while sending data. Index: DnsMail.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/DnsMail/DnsMail.cs,v retrieving revision 1.2.4.1 retrieving revision 1.2.4.2 diff -C2 -d -r1.2.4.1 -r1.2.4.2 *** DnsMail.cs 17 Jul 2006 12:51:51 -0000 1.2.4.1 --- DnsMail.cs 2 Aug 2006 17:06:14 -0000 1.2.4.2 *************** *** 778,825 **** private void sendbuffereddata(StringBuilder header) { ! byte[] buffer; int len; ! try { // :::::::::::::: Send Headers :::::::::::: buffer = m_Enc.GetBytes( header.ToString() ); ! header.Remove(0, header.Length); header = null; int sent = SocketWrite(buffer, buffer.Length); if (sent <= 0 || sent != buffer.Length) throw new Exception("Headers couldn't be sent!"); ! // ::::::::::::::::: Send Body ::::::::::::::::: ! if (mi.Body != null && (len=mi.Body.Length) > 0) { ! String body = mi.Body; ! char[] buffchar = new char[MaxBuffer]; ! int totalsent = 0, remain, tosend; ! bool finalbuffer = false; ! remain = len; ! do { ! if (remain > MaxBuffer) ! tosend = MaxBuffer; ! else ! { ! tosend = remain; ! finalbuffer = true; ! } ! body.CopyTo(totalsent, buffchar, 0, tosend); ! //qp encode ! buffer = MIME.QPEncode( ! m_Enc.GetBytes(buffchar, 0, tosend), ! finalbuffer ? SmtpEncode.All : SmtpEncode.Dot ! ); ! // send ! sent = SocketWrite(buffer, buffer.Length); ! if((sent<=0)||(sent!=buffer.Length)) break; ! totalsent += tosend; remain -= tosend; ! OnSendProgress(totalsent, remain); ! buffer = null; } - while( totalsent < len && m_Client.Connected); - Array.Clear(buffchar, 0, buffchar.Length); - body = null; buffchar = null; } len = sent = 0; } --- 778,837 ---- private void sendbuffereddata(StringBuilder header) { ! byte[] buffer; ! try { + int len, tosend; // :::::::::::::: Send Headers :::::::::::: buffer = m_Enc.GetBytes( header.ToString() ); ! header.Remove(0, header.Length); ! header = null; int sent = SocketWrite(buffer, buffer.Length); if (sent <= 0 || sent != buffer.Length) throw new Exception("Headers couldn't be sent!"); ! if (mi.Body == null || (len=mi.Body.Length) <= 0) ! goto Label_finish; ! ! int remain = len; ! int totalsent = 0; ! bool finalbuffer = false; ! ! String body = mi.Body; ! char[] buffchar = new char[MaxBuffer]; ! ! Label_loop: ! ! if (remain > MaxBuffer) ! tosend = MaxBuffer; ! else { ! tosend = remain; ! finalbuffer = true; ! } ! ! body.CopyTo(totalsent, buffchar, 0, tosend); ! //qp encode ! buffer = MIME.QPEncode( ! m_Enc.GetBytes(buffchar, 0, tosend), ! finalbuffer ? SmtpEncode.All : SmtpEncode.Dot ! ); ! // send ! sent = SocketWrite(buffer, buffer.Length); ! if ((sent > 0) && sent == buffer.Length) ! { ! totalsent += tosend; ! remain -= tosend; ! OnSendProgress(totalsent, remain); ! buffer = null; ! if ((totalsent < len) && m_Client.Connected) { ! goto Label_loop; } } + + body = null; + buffchar = null; + + Label_finish: len = sent = 0; } *************** *** 828,833 **** try { ! if (m_Client != null && m_Client.Connected && ! m_Client.Poll(TimeOut, SelectMode.SelectWrite)) SocketWrite(crlf_dot_crlf, crlf_dot_crlf.Length); } --- 840,844 ---- try { ! if (m_Client != null && m_Client.Connected && m_Client.Poll(TimeOut, SelectMode.SelectWrite)) SocketWrite(crlf_dot_crlf, crlf_dot_crlf.Length); } *************** *** 836,840 **** } } ! private byte[] recvBuffer; private Commands SendAndReceive(String val) --- 847,851 ---- } } ! private byte[] recvBuffer; private Commands SendAndReceive(String val) |
From: Ethem E. <et...@us...> - 2006-08-02 15:59:29
|
Update of /cvsroot/dnsmail/dnsmail/DnsMail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv7493/dnsmail/DnsMail Modified Files: OpenSslStream.cs Log Message: Some optimisation. Merged from 02stable. Index: OpenSslStream.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/DnsMail/OpenSslStream.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OpenSslStream.cs 22 May 2006 10:46:39 -0000 1.2 --- OpenSslStream.cs 2 Aug 2006 15:59:26 -0000 1.3 *************** *** 265,279 **** s.Blocking = false; - bool retry = true; int err; ! do ! { ! if ((err=UnsafeOpenSsl.SSL_connect(sslSession)) <= 0) ! retry = handle_ssl_error(err, stack); ! else ! break; ! } while(retry); ! if(!s.Blocking) s.Blocking = true; --- 265,272 ---- s.Blocking = false; int err; ! while (((err=UnsafeOpenSsl.SSL_connect(sslSession)) <= 0) && handle_ssl_error(err, stack)); ! if (!s.Blocking) s.Blocking = true; |
From: Ethem E. <et...@us...> - 2006-08-02 15:55:16
|
Update of /cvsroot/dnsmail/dnsmail/DnsMail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv6677/dnsmail/DnsMail Modified Files: Tag: DNSMAIL_02 OpenSslStream.cs Log Message: Some optimisation. Index: OpenSslStream.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/DnsMail/OpenSslStream.cs,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -C2 -d -r1.1.4.1 -r1.1.4.2 *** OpenSslStream.cs 22 May 2006 10:39:28 -0000 1.1.4.1 --- OpenSslStream.cs 2 Aug 2006 15:55:12 -0000 1.1.4.2 *************** *** 265,279 **** s.Blocking = false; - bool retry = true; int err; ! do ! { ! if ((err=UnsafeOpenSsl.SSL_connect(sslSession)) <= 0) ! retry = handle_ssl_error(err, stack); ! else ! break; ! } while(retry); ! if(!s.Blocking) s.Blocking = true; --- 265,272 ---- s.Blocking = false; int err; ! while (((err=UnsafeOpenSsl.SSL_connect(sslSession)) <= 0) && handle_ssl_error(err, stack)); ! if (!s.Blocking) s.Blocking = true; |
From: Ethem E. <et...@us...> - 2006-07-28 19:04:15
|
Update of /cvsroot/dnsmail/binary/exe In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv22225/exe Log Message: Directory /cvsroot/dnsmail/binary/exe added to the repository |
From: Ethem E. <et...@us...> - 2006-07-27 10:06:56
|
Update of /cvsroot/dnsmail/binary In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv26584/binary Log Message: Directory /cvsroot/dnsmail/binary added to the repository |
From: Ethem E. <et...@us...> - 2006-07-17 12:55:34
|
Update of /cvsroot/dnsmail/dnsmail/DnsMail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv6681/dnsmail/DnsMail Modified Files: DnsMail.cs Log Message: LocalPoint property added to DnsMail client. This species bind address when a socket creation. Merged from DNSMAIL_02. Index: DnsMail.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/DnsMail/DnsMail.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DnsMail.cs 21 Mar 2006 18:51:02 -0000 1.3 --- DnsMail.cs 17 Jul 2006 12:55:29 -0000 1.4 *************** *** 153,156 **** --- 153,178 ---- } + private EndPoint m_LocalPoint; + public EndPoint LocalPoint + { + get + { + if (m_LocalPoint == null) + { + IPHostEntry iphostentry = Dns.GetHostByName(DNSAPI.LocalHost); + foreach(IPAddress ip in iphostentry.AddressList) + { + if (! IPAddress.IsLoopback(ip)) + { + m_LocalPoint = new IPEndPoint(ip, 0); + break; + } + } + } + return m_LocalPoint; + } + set { m_LocalPoint = value; } + } + #region ssl section *************** *** 553,556 **** --- 575,579 ---- { m_Client = new Socket(AddressFamily.InterNetwork,SocketType.Stream,ProtocolType.Tcp); + m_Client.Bind(LocalPoint); m_Client.SetSocketOption(SocketOptionLevel.Tcp,SocketOptionName.NoDelay,1); m_Client.SetSocketOption(SocketOptionLevel.Socket,SocketOptionName.ReceiveTimeout,TimeOut); |
From: Ethem E. <et...@us...> - 2006-07-17 12:51:54
|
Update of /cvsroot/dnsmail/dnsmail/DnsMail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv5313/dnsmail/DnsMail Modified Files: Tag: DNSMAIL_02 DnsMail.cs Log Message: LocalPoint property added to DnsMail client. This species bind address when a socket creation. Index: DnsMail.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/DnsMail/DnsMail.cs,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** DnsMail.cs 9 Mar 2006 18:03:43 -0000 1.2 --- DnsMail.cs 17 Jul 2006 12:51:51 -0000 1.2.4.1 *************** *** 153,156 **** --- 153,178 ---- } + private EndPoint m_LocalPoint; + public EndPoint LocalPoint + { + get + { + if (m_LocalPoint == null) + { + IPHostEntry iphostentry = Dns.GetHostByName(DNSAPI.LocalHost); + foreach(IPAddress ip in iphostentry.AddressList) + { + if (! IPAddress.IsLoopback(ip)) + { + m_LocalPoint = new IPEndPoint(ip, 0); + break; + } + } + } + return m_LocalPoint; + } + set { m_LocalPoint = value; } + } + #region ssl section *************** *** 543,546 **** --- 565,569 ---- { m_Client = new Socket(AddressFamily.InterNetwork,SocketType.Stream,ProtocolType.Tcp); + m_Client.Bind(LocalPoint); m_Client.SetSocketOption(SocketOptionLevel.Tcp,SocketOptionName.NoDelay,1); m_Client.SetSocketOption(SocketOptionLevel.Socket,SocketOptionName.ReceiveTimeout,TimeOut); |
From: Ethem E. <et...@us...> - 2006-06-21 07:23:41
|
Update of /cvsroot/dnsmail/eskiprojeler/20052006-bahar In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6265/20052006-bahar Log Message: Directory /cvsroot/dnsmail/eskiprojeler/20052006-bahar added to the repository |
From: Ethem E. <et...@us...> - 2006-06-21 07:22:55
|
Update of /cvsroot/dnsmail/eskiprojeler In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv5852/eskiprojeler Log Message: Directory /cvsroot/dnsmail/eskiprojeler added to the repository |
From: Ethem E. <et...@us...> - 2006-06-12 07:23:50
|
Update of /cvsroot/dnsmail/projeler/derskaydi-io In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv30762/projeler/derskaydi-io Added Files: Default.aspx Default.aspx.cs Hazýrlayanlar.txt Ogrenci_Isleri.mdf Ogrenci_Isleri_log.ldf Sql Server Bilgileri.txt Web.Config derskayit.aspx derskayit.aspx.cs odk.aspx odk.aspx.cs ogrencikayit.aspx ogrencikayit.aspx.cs yonetici.aspx yonetici.aspx.cs Log Message: Ogrenci ders kaydi --- NEW FILE: Default.aspx.cs --- (This appears to be a binary file; contents omitted.) --- NEW FILE: derskayit.aspx.cs --- (This appears to be a binary file; contents omitted.) --- NEW FILE: yonetici.aspx.cs --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Sql Server Bilgileri.txt --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Default.aspx --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ogrencikayit.aspx.cs --- (This appears to be a binary file; contents omitted.) --- NEW FILE: odk.aspx.cs --- (This appears to be a binary file; contents omitted.) --- NEW FILE: odk.aspx --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Ogrenci_Isleri.mdf --- (This appears to be a binary file; contents omitted.) --- NEW FILE: derskayit.aspx --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Ogrenci_Isleri_log.ldf --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Web.Config --- <?xml version="1.0"?> <!-- Note: As an alternative to hand editing this file you can use the web admin tool to configure settings for your application. Use the Website->Asp.Net Configuration option in Visual Studio. A full list of settings and comments can be found in machine.config.comments usually located in \Windows\Microsoft.Net\Framework\v2.x\Config --> <configuration> <appSettings/> <connectionStrings> <add name="Ogrenci_IsleriConnectionString" connectionString="Data Source=.;Initial Catalog=Ogrenci_Isleri;User ID=yonetici;Password=gizli" providerName="System.Data.SqlClient" /> <add name="Ogrenci_IsleriConnectionString2" connectionString="Data Source=.;Initial Catalog=Ogrenci_Isleri;User ID=yonetici;Password=gizli" providerName="System.Data.SqlClient" /> <add name="Ogrenci_IsleriConnectionString3" connectionString="Data Source=.;Initial Catalog=Ogrenci_Isleri;User ID=yonetici;Password=gizli" providerName="System.Data.SqlClient" /> <add name="Ogrenci_IsleriConnectionString4" connectionString="Data Source=.;Initial Catalog=Ogrenci_Isleri;User ID=yonetici;Password=gizli" providerName="System.Data.SqlClient" /> <add name="Ogrenci_IsleriConnectionString5" connectionString="Data Source=.;Initial Catalog=Ogrenci_Isleri;User ID=yonetici;Password=gizli" providerName="System.Data.SqlClient" /> <add name="Ogrenci_IsleriConnectionString6" connectionString="Data Source=.;Initial Catalog=Ogrenci_Isleri;User ID=yonetici;Password=gizli" providerName="System.Data.SqlClient" /> <add name="Ogrenci_IsleriConnectionString7" connectionString="Data Source=.;Initial Catalog=Ogrenci_Isleri;User ID=yonetici;Password=gizli" providerName="System.Data.SqlClient" /> </connectionStrings> <system.web> <!-- Set compilation debug="true" to insert debugging symbols into the compiled page. Because this affects performance, set this value to true only during development. --> <compilation debug="true"/> <!-- The <authentication> section enables configuration of the security authentication mode used by ASP.NET to identify an incoming user. --> <authentication mode="Windows"/> <!-- The <customErrors> section enables configuration of what to do if/when an unhandled error occurs during the execution of a request. Specifically, it enables developers to configure html error pages to be displayed in place of a error stack trace. <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> <error statusCode="403" redirect="NoAccess.htm" /> <error statusCode="404" redirect="FileNotFound.htm" /> </customErrors> --> </system.web> </configuration> --- NEW FILE: Hazýrlayanlar.txt --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ogrencikayit.aspx --- (This appears to be a binary file; contents omitted.) --- NEW FILE: yonetici.aspx --- (This appears to be a binary file; contents omitted.) |
From: Ethem E. <et...@us...> - 2006-06-12 07:21:40
|
Update of /cvsroot/dnsmail/projeler/derskaydi-io/App_Data In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv30847/App_Data Log Message: Directory /cvsroot/dnsmail/projeler/derskaydi-io/App_Data added to the repository |
From: Ethem E. <et...@us...> - 2006-06-12 07:17:05
|
Update of /cvsroot/dnsmail/projeler/00labelimagelink-io In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv28222/projeler/00labelimagelink-io Added Files: Default.aspx Default.aspx.cs Web.Config buton1_o4.gif Log Message: --- NEW FILE: Web.Config --- <?xml version="1.0"?> <!-- Note: As an alternative to hand editing this file you can use the web admin tool to configure settings for your application. Use the Website->Asp.Net Configuration option in Visual Studio. A full list of settings and comments can be found in machine.config.comments usually located in \Windows\Microsoft.Net\Framework\v2.x\Config --> <configuration> <appSettings/> <connectionStrings/> <system.web> <!-- Set compilation debug="true" to insert debugging symbols into the compiled page. Because this affects performance, set this value to true only during development. --> <compilation debug="true"/> <!-- The <authentication> section enables configuration of the security authentication mode used by ASP.NET to identify an incoming user. --> <authentication mode="Windows"/> <!-- The <customErrors> section enables configuration of what to do if/when an unhandled error occurs during the execution of a request. Specifically, it enables developers to configure html error pages to be displayed in place of a error stack trace. <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> <error statusCode="403" redirect="NoAccess.htm" /> <error statusCode="404" redirect="FileNotFound.htm" /> </customErrors> --> </system.web> </configuration> --- NEW FILE: Default.aspx.cs --- using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { int toplam = Convert.ToInt32(TextBox1.Text) + Convert.ToInt32(TextBox1.Text); Label4.Text = Convert.ToString(toplam); TextBox1.Text = ""; TextBox2.Text = ""; } } --- NEW FILE: buton1_o4.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Default.aspx --- (This appears to be a binary file; contents omitted.) |
From: Ethem E. <et...@us...> - 2006-06-12 07:16:48
|
Update of /cvsroot/dnsmail/projeler/00listepanel In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv28156/projeler/00listepanel Added Files: CheckBoxListAutoPostBack.aspx ListBoxAutoPostBack.aspx PanelMultiPage.aspx Log Message: Listbox Checkbox Panel --- NEW FILE: CheckBoxListAutoPostBack.aspx --- <%@ Page Language="C#"%> <script Runat="Server"> void chklFavoriteFoods_SelectedIndexChanged( object s, EventArgs e ) { string strList = String.Empty; foreach (ListItem itmFood in chklFavoriteFoods.Items) if ( itmFood.Selected ) strList += "<li>" + itmFood.Text; lblFoodList.Text = strList; } </Script> <html> <head><title>CheckBoxListAutoPostBack.aspx</title></head> <body bgcolor="#cc33ff" style="font-size: medium; color: maroon; font-family: 'Comic Sans MS'"> <form Runat="Server"> <asp:CheckBoxList ID="chklFavoriteFoods" AutoPostBack="True" OnSelectedIndexChanged="chklFavoriteFoods_SelectedIndexChanged" Runat="Server" BackColor="#FF80FF" BorderColor="Yellow" ForeColor="Maroon" BorderStyle="Inset" Font-Bold="True" Font-Italic="True" Font-Names="Comic Sans MS" Font-Overline="False" Font-Size="Medium" Font-Underline="True"> <asp:ListItem Text="müzik" /> <asp:ListItem Text="sinema" Selected="True"/> <asp:ListItem Text="resim"/> <asp:ListItem Text="kitaplar"/> <asp:ListItem Text="spor"/> <asp:ListItem Text="gezmek"/> <asp:ListItem Text="araba kullanmak"/> <asp:ListItem Text="tiyatro"/> <asp:ListItem Text="müzik"/> </asp:CheckBoxList> <hr> ÝÞTE FAVORÝLERÝM: <asp:Label ID="lblFoodList" Runat="Server" BackColor="Orchid" ForeColor="Brown" Font-Bold="True" Font-Italic="True" Font-Names="Comic Sans MS" /> </form> </body> </html> --- NEW FILE: PanelMultiPage.aspx --- <%@ Page Language="C#"%> <script runat="server" backcolor="LightSeaGreen" font-bold="true" font-italic="false"> void Page_Load( Object s, EventArgs e ) { if (! IsPostBack ) { ViewState[ "CurrentPage" ] = 1; } } void btnNextPage_Click( object s, EventArgs e ) { Panel pnlPanel; string strPanelName; // Hide Previous Panel strPanelName = "pnlForm" + ViewState[ "CurrentPage" ]; pnlPanel = (Panel)FindControl( strPanelName ); pnlPanel.Visible = false; // Show Current Panel int currentPage = (int)ViewState["CurrentPage"]; currentPage+=1; ViewState["CurrentPage"] = currentPage; strPanelName = "pnlForm" + ViewState[ "CurrentPage" ]; pnlPanel = (Panel)FindControl( strPanelName ); pnlPanel.Visible = true; } void btnPrevPage_Click( object s, EventArgs e ) { Panel pnlPanel; string strPanelName; // Hide Current Panel strPanelName = "pnlForm" + ViewState[ "CurrentPage" ]; pnlPanel = (Panel)FindControl( strPanelName ); pnlPanel.Visible = false; // Show Previous Panel int currentPage = (int)ViewState["CurrentPage"]; currentPage-=1; ViewState["CurrentPage"] = currentPage; strPanelName = "pnlForm" + ViewState[ "CurrentPage" ]; pnlPanel = (Panel)FindControl( strPanelName ); pnlPanel.Visible = true; } void btnFinish_Click( object s, EventArgs e ) { pnlForm3.Visible = false; pnlForm4.Visible = true; lblSummary.Text = "<h2>ÝÞTE YAZDIKLARINIZ:</h2>"; lblSummary.Text += "<li> ADINIZ : " + txtFirstname.Text; lblSummary.Text += "<li> SOYADINIZ : " + txtLastname.Text; lblSummary.Text += "<li> FAVORÝ RENGÝNÝZ : " + txtFavColor.Text; lblSummary.Text += "<li> FAVORÝ YEMEÐÝNÝZ : " + radlFavPhilosopher.SelectedItem.Text; } </Script> <html> <head><title>PanelMultiPage.aspx</title></head> <body> <form Runat="Server"> <asp:Panel ID="pnlForm1" Runat="Server" BackColor="LightSeaGreen" Font-Bold="true" Font-Italic="true" Font-Size="Medium"> <h3>Sayfa <%=ViewState[ "CurrentPage" ]%> / 3</h3> <hr> ADINIZ: <asp:TextBox ID="txtFirstname" Runat="Server" /> <p backcolor="LightSeaGreen"> SOYADINIZ: <asp:TextBox ID="txtLastname" Runat="Server" /> <hr> <asp:Button Text="Sonraki Sayfa >>" OnClick="btnNextPage_Click" Runat="Server" /> </asp:Panel> <asp:Panel ID="pnlForm2" Runat="Server" Visible="False" BackColor="LightSeaGreen"> <h3>Sayfa <%=ViewState[ "CurrentPage" ]%> / 3</h3> <hr> FAVORÝ RENGÝNÝZ: <asp:TextBox ID="txtFavColor" Runat="Server" /> <hr> <asp:Button Text="<< Önceki Sayfa" OnClick="btnPrevPage_Click" Runat="Server" /> <asp:Button Text="Sonraki Sayfa >>" OnClick="btnNextPage_Click" Runat="Server" /> </asp:Panel> <asp:Panel ID="pnlForm3" Runat="Server" Visible="False" BackColor="LightSeaGreen"> <h3>Sayfa <%=ViewState[ "CurrentPage" ]%> / 3</h3> <hr> FAVORÝ YEMEÐÝNÝZ: <asp:RadioButtonList ID="radlFavPhilosopher" Runat="Server"> <asp:ListItem Text="Kebap" Selected="True"/> <asp:ListItem Text="Pizza" /> <asp:ListItem Text="Hamburger" /> </asp:RadioButtonList> <hr> <asp:Button Text="<< Önceki Sayfa" OnClick="btnPrevPage_Click" Runat="Server" /> <asp:Button Text="Sonuç" OnClick="btnFinish_Click" Runat="Server" /> </asp:Panel> <asp:Panel ID="pnlForm4" Runat="Server" Visible="False"> <asp:Label ID="lblSummary" Runat="Server"/> </asp:Panel> </form> </body> </html> --- NEW FILE: ListBoxAutoPostBack.aspx --- <%@ Page Language="C#"%> <script Runat="Server"> string strBackGroundColor = "white"; void lstColors_SelectedIndexChanged( object s, EventArgs e ) { strBackGroundColor = lstColors.SelectedItem.Text; } </Script> <html> <head><title>ListboxAutoPostBack.aspx</title></head> <body bgcolor="<%=strBackGroundColor%>"> <form Runat="Server"> <asp:ListBox ID="lstColors" AutoPostBack="True" OnSelectedIndexChanged="lstColors_SelectedIndexChanged" Runat="Server" Height="256px" Width="128px" Font-Bold="True" Font-Italic="True" Font-Names="Comic Sans MS" Font-Size="Large" > <asp:ListItem text="Red" /> <asp:ListItem text="Green" /> <asp:ListItem text="Blue" /> <asp:ListItem text="Pink" /> <asp:ListItem text="Yellow" /> <asp:ListItem text="Black" /> <asp:ListItem text="Maroon" /> </asp:ListBox> </form> </body> </html> |
From: Ethem E. <et...@us...> - 2006-06-12 07:15:26
|
Update of /cvsroot/dnsmail/projeler/00labelimagelink-io In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27496/00labelimagelink-io Log Message: Directory /cvsroot/dnsmail/projeler/00labelimagelink-io added to the repository |
From: Ethem E. <et...@us...> - 2006-06-12 07:15:26
|
Update of /cvsroot/dnsmail/projeler/00listepanel In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27496/00listepanel Log Message: Directory /cvsroot/dnsmail/projeler/00listepanel added to the repository |
From: Ethem E. <et...@us...> - 2006-06-08 11:09:39
|
Update of /cvsroot/dnsmail/projeler/dosya-io In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv20278/projeler/dosya-io Added Files: Default.aspx Default.aspx.cs Web.Config append.aspx.cs appendtext.aspx binaryread.aspx binaryread.aspx.cs binarywrite.aspx binarywrite.aspx.cs opentext.aspx opentext.aspx.cs writetext.aspx writetext.aspx.cs Log Message: Dosya islemleri --- NEW FILE: opentext.aspx.cs --- using System; using System.IO; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { StreamReader objStreamReader; string strInput; if (File.Exists(MapPath("deneme.txt"))) { objStreamReader = File.OpenText(MapPath("deneme.txt")); strInput = objStreamReader.ReadLine(); while (strInput != null) { lblContents.Text += "<li>" + strInput; strInput = objStreamReader.ReadLine(); } objStreamReader.Close(); } else { lblContents.Text = "deneme.txt dosyasý bulunamadý!"; } } } --- NEW FILE: Default.aspx --- (This appears to be a binary file; contents omitted.) --- NEW FILE: opentext.aspx --- (This appears to be a binary file; contents omitted.) --- NEW FILE: binaryread.aspx --- (This appears to be a binary file; contents omitted.) --- NEW FILE: appendtext.aspx --- (This appears to be a binary file; contents omitted.) --- NEW FILE: binaryread.aspx.cs --- using System; using System.IO; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { FileStream objFileStream; BinaryReader objBinaryReader; int intCounter; objFileStream = new FileStream(MapPath("deneme.data"), FileMode.Open, FileAccess.Read, FileShare.Read); objBinaryReader = new BinaryReader(objFileStream); for (int i = 0; i < 30; i++) { Response.Write("<li>" + objBinaryReader.ReadInt32().ToString()); } objBinaryReader.Close(); Response.Write("<BR>" + "hepsi okundu!"); } } --- NEW FILE: writetext.aspx --- (This appears to be a binary file; contents omitted.) --- NEW FILE: binarywrite.aspx --- (This appears to be a binary file; contents omitted.) --- NEW FILE: writetext.aspx.cs --- using System; using System.IO; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { StreamWriter objStreamWriter; objStreamWriter = File.CreateText(MapPath("deneme.txt")); objStreamWriter.WriteLine(txtInput.Text); objStreamWriter.Close(); } protected void TextBox1_TextChanged(object sender, EventArgs e) { } protected void txtInput_TextChanged(object sender, EventArgs e) { } } --- NEW FILE: Default.aspx.cs --- using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button4_Click(object sender, EventArgs e) { } } --- NEW FILE: Web.Config --- <?xml version="1.0"?> <!-- Note: As an alternative to hand editing this file you can use the web admin tool to configure settings for your application. Use the Website->Asp.Net Configuration option in Visual Studio. A full list of settings and comments can be found in machine.config.comments usually located in \Windows\Microsoft.Net\Framework\v2.x\Config --> <configuration> <appSettings/> <connectionStrings/> <system.web> <!-- Set compilation debug="true" to insert debugging symbols into the compiled page. Because this affects performance, set this value to true only during development. --> <compilation debug="true"/> <!-- The <authentication> section enables configuration of the security authentication mode used by ASP.NET to identify an incoming user. --> <authentication mode="Windows"/> <!-- The <customErrors> section enables configuration of what to do if/when an unhandled error occurs during the execution of a request. Specifically, it enables developers to configure html error pages to be displayed in place of a error stack trace. <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> <error statusCode="403" redirect="NoAccess.htm" /> <error statusCode="404" redirect="FileNotFound.htm" /> </customErrors> --> </system.web> </configuration> --- NEW FILE: append.aspx.cs --- using System; using System.IO; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { StreamWriter aStreamWriter; aStreamWriter = File.AppendText(MapPath("deneme.txt")); aStreamWriter.WriteLine(txtInput.Text); aStreamWriter.Close(); } protected void TextBox1_TextChanged(object sender, EventArgs e) { } } --- NEW FILE: binarywrite.aspx.cs --- using System; using System.IO; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { FileStream objFileStream; BinaryWriter objBinaryWriter; int intCounter; objFileStream = new FileStream(MapPath("deneme.data"), FileMode.Create); objBinaryWriter = new BinaryWriter(objFileStream); for (int i = 0; i < 50; i++) { objBinaryWriter.Write(i); } objBinaryWriter.Close(); Response.Write("ikili(binary) dosya yaratýldý"); } } |
From: Ethem E. <et...@us...> - 2006-06-08 11:06:23
|
Update of /cvsroot/dnsmail/projeler/dosya-io/App_Data In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv19902/App_Data Log Message: Directory /cvsroot/dnsmail/projeler/dosya-io/App_Data added to the repository |
From: Ethem E. <et...@us...> - 2006-06-07 22:15:43
|
Update of /cvsroot/dnsmail/projeler/validator-no/App_Data In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv907/projeler/validator-no/App_Data Added Files: Database.mdf Database_log.LDF Log Message: Sql server dosyalari --- NEW FILE: Database_log.LDF --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Database.mdf --- (This appears to be a binary file; contents omitted.) |
From: Ethem E. <et...@us...> - 2006-06-07 22:14:34
|
Update of /cvsroot/dnsmail/projeler/grafik-io In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12997/projeler/grafik-io Added Files: Default.aspx grafik.jpg proje ile ilgili.txt Log Message: Grafik 2. ogretim. --- NEW FILE: grafik.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: proje ile ilgili.txt --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Default.aspx --- (This appears to be a binary file; contents omitted.) |
From: Ethem E. <et...@us...> - 2006-06-07 22:14:31
|
Update of /cvsroot/dnsmail/projeler/grafik-io/db In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv13840/projeler/grafik-io/db Added Files: grafik.mdb Log Message: grafik 2. ogretim veritabani --- NEW FILE: grafik.mdb --- (This appears to be a binary file; contents omitted.) |
From: Mahmut <meb...@us...> - 2006-06-07 22:11:17
|
Update of /cvsroot/dnsmail/derskaydi-io/WebSite1 In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv30572/WebSite1 Log Message: Directory /cvsroot/dnsmail/derskaydi-io/WebSite1 added to the repository |
From: Ethem E. <et...@us...> - 2006-06-07 21:55:06
|
Update of /cvsroot/dnsmail/projeler/grafik-io/db In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12850/db Log Message: Directory /cvsroot/dnsmail/projeler/grafik-io/db added to the repository |
From: Ethem E. <et...@us...> - 2006-06-07 21:53:41
|
Update of /cvsroot/dnsmail/projeler/ajanda-no/App_Data In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv32548/projeler/ajanda-no/App_Data Added Files: KAYITLAR.MDB Log Message: veritabani --- NEW FILE: KAYITLAR.MDB --- (This appears to be a binary file; contents omitted.) |
Update of /cvsroot/dnsmail/projeler/sozluk-no/arraylist-hashtable In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21812/arraylist-hashtable Added Files: 1.Addrange.cs 10.trimToSize.cs 12.copytoarray.cs 14.copytoarray(Array a,int indeks).cs 15.CopyTo Method (Int32, Array, Int32, Int32).cs 16.Getrange.cs 2.sort.cs 20.removeAt.cs 4.Sort(Icomparer).cs 5.sort(int indeks).cs 6.Binarysearch(object o).cs 7.reverse.cs 8.reverse.cs 9.clear.cs ARRAYLIST SINIFI.doc add.cs arraylist1.cs arraylist2-1.cs arraylist2.cs capacity.cs hashtable.cs hashtablecount.cs Log Message: Sunumdaki kodlar ve metin --- NEW FILE: 16.Getrange.cs --- using System; using System.Collections; public class SamplesArrayList { public static void Main() { // Yeni bir arraylist oluþtururuz ve baþlangýç durumuna getiririz. ArrayList myAL = new ArrayList(); myAL.Add("The"); myAL.Add("quick"); myAL.Add("brown"); myAL.Add("fox"); myAL.Add("jumped"); myAL.Add("over"); myAL.Add("the"); myAL.Add("lazy"); myAL.Add("dog"); //index 0dan baþlatarak 5 tane elemanýn deðerlerini ekrana yazdýrýr. ArrayList mySubAL = myAL.GetRange(0, 5); Console.WriteLine("Index 0 dan 4 kadar arraylistte bulunanlar:"); PrintValues(mySubAL, '\t'); } public static void PrintValues( IEnumerable myList, char mySeparator ) { System.Collections.IEnumerator myEnumerator = myList.GetEnumerator(); while ( myEnumerator.MoveNext() ) Console.Write( "{0}{1}", mySeparator, myEnumerator.Current ); Console.WriteLine(); } } /* This code produces the following output. Index 0 through 4 contains: The quick brown fox jumped */ --- NEW FILE: add.cs --- using System; using System.Collections; public class SamplesArrayList { public static void Main() { // Creates and initializes a new ArrayList. ArrayList myAL = new ArrayList(); myAL.Add( "The" ); myAL.Add( "quick" ); myAL.Add( "brown" ); myAL.Add( "fox" ); // Creates and initializes a new Queue. Queue myQueue = new Queue(); myQueue.Enqueue( "jumped" ); myQueue.Enqueue( "over" ); myQueue.Enqueue( "the" ); myQueue.Enqueue( "lazy" ); myQueue.Enqueue( "dog" ); // Displays the ArrayList and the Queue. Console.WriteLine( "The ArrayList initially contains the following:" ); PrintValues( myAL, '\t' ); Console.WriteLine( "The Queue initially contains the following:" ); PrintValues( myQueue, '\t' ); // Copies the Queue elements to the end of the ArrayList. myAL.AddRange( myQueue ); // Displays the ArrayList. Console.WriteLine( "The ArrayList now contains the following:" ); PrintValues( myAL, '\t' ); } public static void PrintValues( IEnumerable myList, char mySeparator ) { System.Collections.IEnumerator myEnumerator = myList.GetEnumerator(); while ( myEnumerator.MoveNext() ) Console.Write( "{0}{1}", mySeparator, myEnumerator.Current ); Console.WriteLine(); } } --- NEW FILE: arraylist1.cs --- using System; using system.collections; class Koleksiyon { public static void Main() { ArrayList Alist = new ArrayList(); Console.WriteLine("Varsayýlan Kapasite:" + Alist.Capacity); Alist.Add(6); Alist.Add("CSharp"); Alist.Add('A'); Alist.Add(236.58f); Alist.Add(true); EkranaYaz(Alist); Alist.Remove('A'); Alist(true); Alist("Deneme"); EkranaYaz(Alist); } public static void EkranaYaz(ArrayList al) { foreach (object i in al) Console.Write(i.ToString() + ""); Console.WriteLine(); } } --- NEW FILE: 10.trimToSize.cs --- using System; using System.Collections; public class SamplesArrayList { public static void Main() { // Creates and initializes a new ArrayList. ArrayList myAL = new ArrayList(); myAL.Add( "The" ); myAL.Add( "quick" ); myAL.Add( "brown" ); myAL.Add( "fox" ); myAL.Add( "jumped" ); // Displays the count, capacity and values of the ArrayList. Console.WriteLine( "Initially," ); Console.WriteLine( " Count : {0}", myAL.Count ); Console.WriteLine( " Capacity : {0}", myAL.Capacity ); Console.Write( " Values:" ); PrintValues( myAL ); // Trim the ArrayList. myAL.TrimToSize(); // Displays the count, capacity and values of the ArrayList. Console.WriteLine( "After TrimToSize," ); Console.WriteLine( " Count : {0}", myAL.Count ); Console.WriteLine( " Capacity : {0}", myAL.Capacity ); Console.Write( " Values:" ); PrintValues( myAL ); // Clear the ArrayList. myAL.Clear(); // Displays the count, capacity and values of the ArrayList. Console.WriteLine( "After Clear," ); Console.WriteLine( " Count : {0}", myAL.Count ); Console.WriteLine( " Capacity : {0}", myAL.Capacity ); Console.Write( " Values:" ); PrintValues( myAL ); // Trim the ArrayList again. myAL.TrimToSize(); // Displays the count, capacity and values of the ArrayList. Console.WriteLine( "After the second TrimToSize," ); Console.WriteLine( " Count : {0}", myAL.Count ); Console.WriteLine( " Capacity : {0}", myAL.Capacity ); Console.Write( " Values:" ); PrintValues( myAL ); } public static void PrintValues( IEnumerable myList ) { System.Collections.IEnumerator myEnumerator = myList.GetEnumerator(); while ( myEnumerator.MoveNext() ) Console.Write( "\t{0}", myEnumerator.Current ); Console.WriteLine(); } } /* This code produces the following output. Initially, Count : 5 Capacity : 16 Values: The quick brown fox jumped After TrimToSize, Count : 5 Capacity : 5 Values: The quick brown fox jumped After Clear, Count : 0 Capacity : 5 Values: After the second TrimToSize, Count : 0 Capacity : 16 Values: */ --- NEW FILE: 9.clear.cs --- using System; using System.Collections; public class SamplesArrayList { public static void Main() { // Yeni bir arraylist oluþtururuz ve baþlangýç durumuna getiririz. ArrayList myAL = new ArrayList(); myAL.Add( "The" ); myAL.Add( "quick" ); myAL.Add( "brown" ); myAL.Add( "fox" ); myAL.Add( "jumped" ); // ArrayListin elemansayýsýný, kapasitesini ve deðerlerini ekrana yazdýrýrýz. Console.WriteLine( "Initially," ); Console.WriteLine( " Count : {0}", myAL.Count ); Console.WriteLine( " Capacity : {0}", myAL.Capacity ); Console.Write( " Values:" ); PrintValues( myAL ); // ArrayListe Trim özelliði uygulanýr. myAL.TrimToSize(); // ArrayListin elemansayýsýný, kapasitesini ve deðerlerini ekrana yazdýrýrýz. Console.WriteLine( "After TrimToSize," ); Console.WriteLine( " Count : {0}", myAL.Count ); Console.WriteLine( " Capacity : {0}", myAL.Capacity ); Console.Write( " Values:" ); PrintValues( myAL ); // ArrayListin elemanlarý diziden çýkarýlýr. myAL.Clear(); // ArrayListin elemansayýsýný, kapasitesini ve deðerlerini ekrana tekrar yazdýrýrýz. Console.WriteLine( "After Clear," ); Console.WriteLine( " Count : {0}", myAL.Count ); Console.WriteLine( " Capacity : {0}", myAL.Capacity ); Console.Write( " Values:" ); PrintValues( myAL ); // ArrayListe Trim özelliði tekrar uygulanýr. myAL.TrimToSize(); // rrayListin elemansayýsýný, kapasitesini ve deðerlerini ekrana yazdýrýrýz. Console.WriteLine( "After the second TrimToSize," ); Console.WriteLine( " Count : {0}", myAL.Count ); Console.WriteLine( " Capacity : {0}", myAL.Capacity ); Console.Write( " Values:" ); PrintValues( myAL ); } public static void PrintValues( IEnumerable myList ) { System.Collections.IEnumerator myEnumerator = myList.GetEnumerator(); while ( myEnumerator.MoveNext() ) Console.Write( "\t{0}", myEnumerator.Current ); Console.WriteLine(); } } /* This code produces the following output. Initially, Count : 5 Capacity : 16 Values: The quick brown fox jumped After TrimToSize, Count : 5 Capacity : 5 Values: The quick brown fox jumped After Clear, Count : 0 Capacity : 5 Values: After the second TrimToSize, Count : 0 Capacity : 16 Values: */ --- NEW FILE: 12.copytoarray.cs --- using System; using System.Collections; public class SamplesArrayList { public static void Main() { // Yeni bir arraylist oluþtururuz ve baþlangýç durumuna getiririz. ArrayList mySourceList = new ArrayList(); mySourceList.Add( "three" ); mySourceList.Add( "napping" ); mySourceList.Add( "cats" ); mySourceList.Add( "in" ); mySourceList.Add( "the" ); mySourceList.Add( "barn" ); // hedef diziye index veririrz. Array myTargetArray=Array.CreateInstance( typeof(String), 15 ); myTargetArray.SetValue( "The", 0 ); myTargetArray.SetValue( "quick", 1 ); myTargetArray.SetValue( "brown", 2 ); myTargetArray.SetValue( "fox", 3 ); myTargetArray.SetValue( "jumped", 4 ); myTargetArray.SetValue( "over", 5 ); myTargetArray.SetValue( "the", 6 ); myTargetArray.SetValue( "lazy", 7 ); myTargetArray.SetValue( "dog", 8 ); // Hedef dizi ekrana önceki haliyle yazdýrýrýz. Console.WriteLine( "Hedef dizi aþaðýdakileri içermektedir:" ); PrintValues( myTargetArray, ' ' ); // Kaynak arraylistin ikinci elemaný hedef diziye 7.indexin yerine kopyalanýr. mySourceList.CopyTo( 1, myTargetArray, 7, 1 ); // Hedef dizinin deðerlerini ekrana yazdýrýrýz. PrintValues( myTargetArray, ' ' ); // Kaynak dizinin baþlangýcýndan itibaren elemanlar hedef dizinin 6.indexinden baþlayarak indexlerin yerine kopyalanýr. mySourceList.CopyTo( myTargetArray, 6 ); // Hedef dizinin deðerlerini ekrana yazdýrýrýz. PrintValues( myTargetArray, ' ' ); // Kaynak dizinin baþlangýcýndan itibaren elemanlar hedef dizinin 0.indexinden baþlayarak kopyalanýr. mySourceList.CopyTo( myTargetArray ); // Hedef dizinin deðerlerini ekrana yazdýrýrýz. PrintValues( myTargetArray, ' ' ); } public static void PrintValues( Array myArr, char mySeparator ) { System.Collections.IEnumerator myEnumerator = myArr.GetEnumerator(); int i = 0; int cols = myArr.GetLength( myArr.Rank - 1 ); while ( myEnumerator.MoveNext() ) { if ( i < cols ) { i++; } else { Console.WriteLine(); i = 1; } Console.Write( "{0}{1}", mySeparator, myEnumerator.Current ); } Console.WriteLine(); } } /* This code produces the following output. The target Array contains the following (before and after copying): The quick brown fox jumped over the lazy dog The quick brown fox jumped over the napping dog The quick brown fox jumped over three napping cats in the barn three napping cats in the barn three napping cats in the barn */ --- NEW FILE: 4.Sort(Icomparer).cs --- using System; using System.Collections; public class SamplesArrayList { public class myReverserClass : IComparer { int IComparer.Compare( Object x, Object y ) { return( (new CaseInsensitiveComparer()).Compare( y, x ) ); } } public static void Main() { // Yeni bir arraylist oluþtururuz ArrayList myAL = new ArrayList(); myAL.Add( "The" ); myAL.Add( "quick" ); myAL.Add( "brown" ); myAL.Add( "fox" ); myAL.Add( "jumps" ); myAL.Add( "over" ); myAL.Add( "the" ); myAL.Add( "lazy" ); myAL.Add( "dog" ); Console.WriteLine( "ArrayList aþaðýdaki deðerleri içermektedir:" ); PrintIndexAndValues( myAL ); myAL.Sort(); Console.WriteLine( "Sort uygulamasýndan:" ); PrintIndexAndValues( myAL ); // IComparer karþýlaþtýrma yöntemine göre ters bir þekilde sýralama iþlemi yapýlýr. IComparer myComparer = new myReverserClass(); myAL.Sort( myComparer ); Console.WriteLine("IComparer karþýlaþtýrma yöntemine göre ters bir þekilde sýralama iþlemi:"); PrintIndexAndValues( myAL ); } public static void PrintIndexAndValues( IEnumerable myList ) { int i = 0; System.Collections.IEnumerator myEnumerator = myList.GetEnumerator(); while ( myEnumerator.MoveNext() ) Console.WriteLine( "\t[{0}]:\t{1}", i++, myEnumerator.Current ); Console.WriteLine(); } } /* This code produces the following output. The ArrayList initially contains the following values: [0]: The [1]: quick [2]: brown [3]: fox [4]: jumps [5]: over [6]: the [7]: lazy [8]: dog After sorting with the default comparer: [0]: brown [1]: dog [2]: fox [3]: jumps [4]: lazy [5]: over [6]: quick [7]: the [8]: The After sorting with the reverse case-insensitive comparer: [0]: the [1]: The [2]: quick [3]: over [4]: lazy [5]: jumps [6]: fox [7]: dog [8]: brown */ --- NEW FILE: 14.copytoarray(Array a,int indeks).cs --- using System; using System.Collections; public class SamplesArrayList { public static void Main() { // Creates and initializes the source ArrayList. ArrayList mySourceList = new ArrayList(); mySourceList.Add( "three" ); mySourceList.Add( "napping" ); mySourceList.Add( "cats" ); mySourceList.Add( "in" ); mySourceList.Add( "the" ); mySourceList.Add( "barn" ); // Creates and initializes the one-dimensional target Array. Array myTargetArray=Array.CreateInstance( typeof(String), 15 ); myTargetArray.SetValue( "The", 0 ); myTargetArray.SetValue( "quick", 1 ); myTargetArray.SetValue( "brown", 2 ); myTargetArray.SetValue( "fox", 3 ); myTargetArray.SetValue( "jumped", 4 ); myTargetArray.SetValue( "over", 5 ); myTargetArray.SetValue( "the", 6 ); myTargetArray.SetValue( "lazy", 7 ); myTargetArray.SetValue( "dog", 8 ); // Displays the values of the target Array. Console.WriteLine( "The target Array contains the following (before and after copying):" ); PrintValues( myTargetArray, ' ' ); // Copies the second element from the source ArrayList to the target ArrayList, starting at index 7. mySourceList.CopyTo( 1, myTargetArray, 7, 1 ); // Displays the values of the target Array. PrintValues( myTargetArray, ' ' ); // Copies the entire source ArrayList to the target ArrayList, starting at index 6. mySourceList.CopyTo( myTargetArray, 6 ); // Displays the values of the target Array. PrintValues( myTargetArray, ' ' ); // Copies the entire source ArrayList to the target ArrayList, starting at index 0. mySourceList.CopyTo( myTargetArray ); // Displays the values of the target Array. PrintValues( myTargetArray, ' ' ); } public static void PrintValues( Array myArr, char mySeparator ) { System.Collections.IEnumerator myEnumerator = myArr.GetEnumerator(); int i = 0; int cols = myArr.GetLength( myArr.Rank - 1 ); while ( myEnumerator.MoveNext() ) { if ( i < cols ) { i++; } else { Console.WriteLine(); i = 1; } Console.Write( "{0}{1}", mySeparator, myEnumerator.Current ); } Console.WriteLine(); } } /* This code produces the following output. The target Array contains the following (before and after copying): The quick brown fox jumped over the lazy dog The quick brown fox jumped over the napping dog The quick brown fox jumped over three napping cats in the barn three napping cats in the barn three napping cats in the barn */ --- NEW FILE: hashtablecount.cs --- using System; using System.Collections; class hashtable { public static void Main() { Hashtable sozluk= new Hashtable(); sozluk.Add("Araba","Car"); Sozluk.Add("Masa","Table"); sozluk.Add("Kalem","Pencil"); sozluk["Kitap"]="Book"; sozluk["Bilgisayar"]="Computer"; IDictionaryEnumerator ide = Sozluk.GetENumerator(); while(ide.MoveNext()) Console.Writeline(ide.Key + " = " + ide.Value); Console.Writeline("Toplam Kelime: " + Sozluk.Count); } } --- NEW FILE: 5.sort(int indeks).cs --- using System; using System.Collections; public class SamplesArrayList { public class myReverserClass : IComparer { // Calls CaseInsensitiveComparer.Compare with the parameters reversed. int IComparer.Compare( Object x, Object y ) { return( (new CaseInsensitiveComparer()).Compare( y, x ) ); } } public static void Main() { // Yeni bir arraylist oluþtururuz ArrayList myAL = new ArrayList(); myAL.Add( "The" ); myAL.Add( "QUICK" ); myAL.Add( "BROWN" ); myAL.Add( "FOX" ); myAL.Add( "jumped" ); myAL.Add( "over" ); myAL.Add( "the" ); myAL.Add( "lazy" ); myAL.Add( "dog" ); Console.WriteLine("Alist þu an aþaðýda yazýlanlarý içermektedir."); PrintIndexAndValues( myAL ); // Arraylisti geçerli karþýlaþtýrmaya göre sýralarýz. myAL.Sort( 1, 3, null ); Console.WriteLine( "1.indexten 3.indexe kadar geçerli karþýlaþtýrma özelliðine göre sýralandýktan sonra:" ); PrintIndexAndValues( myAL ); // IComparer karþýlaþtýrma yöntemine göre ters bir þekilde sýralama iþlemi yapýlýr. IComparer myComparer = new myReverserClass(); myAL.Sort( 1, 3, myComparer ); Console.WriteLine("IComparer karþýlaþtýrma yöntemine göre ters bir þekilde sýralama iþlemi:"); PrintIndexAndValues( myAL ); } public static void PrintIndexAndValues( IEnumerable myList ) { int i = 0; System.Collections.IEnumerator myEnumerator = myList.GetEnumerator(); while ( myEnumerator.MoveNext() ) Console.WriteLine( "\t[{0}]:\t{1}", i++, myEnumerator.Current ); Console.WriteLine(); } } /* This code produces the following output. The ArrayList initially contains the following values: [0]: The [1]: QUICK [2]: BROWN [3]: FOX [4]: jumped [5]: over [6]: the [7]: lazy [8]: dog After sorting from index 1 to index 3 with the default comparer: [0]: The [1]: BROWN [2]: FOX [3]: QUICK [4]: jumped [5]: over [6]: the [7]: lazy [8]: dog After sorting from index 1 to index 3 with the reverse case-insensitive comparer: [0]: The [1]: QUICK [2]: FOX [3]: BROWN [4]: jumped [5]: over [6]: the [7]: lazy [8]: dog */ --- NEW FILE: 20.removeAt.cs --- using System; using System.Collections; public class SamplesArrayList { public static void Main() { // Yeni bir arraylist oluþtururuz ve baþlangýç durumuna getiririz. ArrayList myAL = new ArrayList(); myAL.Add( "The" ); myAL.Add( "quick" ); myAL.Add( "brown" ); myAL.Add( "fox" ); myAL.Add( "jumped" ); myAL.Add( "over" ); myAL.Add( "the" ); myAL.Add( "lazy" ); myAL.Add( "dog" ); // ArrayListtekileri ekrana yazdýrýrýz. Console.WriteLine("ArrayList aþaðýdaki deðerleri içermektedir:"); PrintValues( myAL ); // "lazy"kelimesini sil. myAL.Remove( "lazy" ); // Þu an ArrayListte bulunan elemanlarý ekrana yazdýrýrýz. Console.WriteLine( " \"lazy\" silindikten sonra:" ); PrintValues( myAL ); // index 5teki elemaný siler. myAL.RemoveAt( 5 ); // Þu an ArrayListte bulunan elemanlarý ekrana yazdýrýrýz. Console.WriteLine( "index 5teki eleman silindikten sonra:" ); PrintValues( myAL ); // index 4ten itibaren 3 eleman sil. myAL.RemoveRange( 4, 3 ); // Þu an ArrayListte bulunan elemanlarý ekrana yazdýrýrýz. Console.WriteLine("index 4ten itibaren 3 eleman silindikten sonra:"); PrintValues( myAL ); } public static void PrintValues( IEnumerable myList ) { System.Collections.IEnumerator myEnumerator = myList.GetEnumerator(); while ( myEnumerator.MoveNext() ) Console.Write( "\t{0}", myEnumerator.Current ); Console.WriteLine(); } } /* This code produces the following output. The ArrayList initially contains the following: The quick brown fox jumped over the lazy dog After removing "lazy": The quick brown fox jumped over the dog After removing the element at index 5: The quick brown fox jumped the dog After removing three elements starting at index 4: The quick brown fox */ --- NEW FILE: arraylist2-1.cs --- using System; using system.collections; class Deneme { int x; public Deneme(int x) { this.x = x; } } class Koleksiyon { public static void Main() { Arraylist Alist = new Arraylist(); Alist.Add("Sefer"); Alist.Add("Algan"); Alist.Add("Gökçen"); Alist.Add("Yýldýrým"); Deneme d = new Deneme(5); Alist.Add(d); ArrayList Alist = ArrayList.FixedSize(ArrayList (Alist)); foreach(object i in Alist) Console.WriteLine((string)i); } } --- NEW FILE: 8.reverse.cs --- using System; using System.Collections; public class SamplesArrayList { public static void Main() { // Yeni bir arraylist oluþtururuz ve baþlangýç durumuna getiririz. ArrayList myAL = new ArrayList(); myAL.Add( "The" ); myAL.Add( "QUICK" ); myAL.Add( "BROWN" ); myAL.Add( "FOX" ); myAL.Add( "jumps" ); myAL.Add( "over" ); myAL.Add( "the" ); myAL.Add( "lazy" ); myAL.Add( "dog" ); // ArrayListteki deðerleri ekrana yazdýrýrýz. Console.WriteLine("ArrayList aþaðýdaki deðerleri içermektedir::"); PrintIndexAndValues( myAL ); // ArrayListtekileri index deðerlerine göre ters çevirip sýralarýz. myAL.Reverse( 1, 3 ); // ArrayListteki deðerleri ekrana yazdýrýrýz. Console.WriteLine( "Çevirme iþleminden sonra:" ); PrintIndexAndValues( myAL ); } public static void PrintIndexAndValues( IEnumerable myList ) { int i = 0; System.Collections.IEnumerator myEnumerator = myList.GetEnumerator(); while ( myEnumerator.MoveNext() ) Console.WriteLine( "\t[{0}]:\t{1}", i++, myEnumerator.Current ); Console.WriteLine(); } } /* This code produces the following output. The ArrayList initially contains the following values: [0]: The [1]: QUICK [2]: BROWN [3]: FOX [4]: jumps [5]: over [6]: the [7]: lazy [8]: dog After reversing: [0]: The [1]: FOX [2]: BROWN [3]: QUICK [4]: jumps [5]: over [6]: the [7]: lazy [8]: dog */ --- NEW FILE: hashtable.cs --- using System; using System.Collections; class hashtable { public static void Main() { Hashtable sozluk= new Hashtable(); sozluk.Add("Araba","Car"); Sozluk.Add("Masa","Table"); sozluk.Add("Kalem","Pencil"); sozluk["Kitap"]="Book"; sozluk["Bilgisayar"]="Computer"; ICollection anahtarlar = Sozluk.Keys; foreach(string anahtar in anahtarlar) Console.Writeline(anahtar + " = " + sozluk[anahtar]); Console.WriteLine("Toplam Kelime: "+ Sozluk.Count); } } --- NEW FILE: 7.reverse.cs --- using System; using System.Collections; public class SamplesArrayList { public static void Main() { // Yeni bir arraylist oluþtururuz ve baþlangýç durumuna getiririz. ArrayList myAL = new ArrayList(); myAL.Add( "The" ); myAL.Add( "quick" ); myAL.Add( "brown" ); myAL.Add( "fox" ); myAL.Add( "jumps" ); myAL.Add( "over" ); myAL.Add( "the" ); myAL.Add( "lazy" ); myAL.Add( "dog" ); // ArrayListteki deðerleri ekrana yazdýrýrýz. Console.WriteLine("ArrayList aþaðýdaki deðerleri içermektedir:"); PrintIndexAndValues( myAL ); // ArrayListtekileri deðerlerine göre ters çevirip sýralarýz. myAL.Reverse(); // ArrayListteki deðerleri ekrana yazdýrýrýz. Console.WriteLine( "Çevirme iþlemi yapýldýktan sonra:" ); PrintIndexAndValues( myAL ); } public static void PrintIndexAndValues( IEnumerable myList ) { int i = 0; System.Collections.IEnumerator myEnumerator = myList.GetEnumerator(); while ( myEnumerator.MoveNext() ) Console.WriteLine( "\t[{0}]:\t{1}", i++, myEnumerator.Current ); Console.WriteLine(); } } /* This code produces the following output. The ArrayList initially contains the following values: [0]: The [1]: quick [2]: brown [3]: fox [4]: jumps [5]: over [6]: the [7]: lazy [8]: dog After reversing: [0]: dog [1]: lazy [2]: the [3]: over [4]: jumps [5]: fox [6]: brown [7]: quick [8]: The */ --- NEW FILE: 15.CopyTo Method (Int32, Array, Int32, Int32).cs --- using System; using System.Collections; public class SamplesArrayList { public static void Main() { // Creates and initializes the source ArrayList. ArrayList mySourceList = new ArrayList(); mySourceList.Add( "three" ); mySourceList.Add( "napping" ); mySourceList.Add( "cats" ); mySourceList.Add( "in" ); mySourceList.Add( "the" ); mySourceList.Add( "barn" ); // Creates and initializes the one-dimensional target Array. Array myTargetArray=Array.CreateInstance( typeof(String), 15 ); myTargetArray.SetValue( "The", 0 ); myTargetArray.SetValue( "quick", 1 ); myTargetArray.SetValue( "brown", 2 ); myTargetArray.SetValue( "fox", 3 ); myTargetArray.SetValue( "jumped", 4 ); myTargetArray.SetValue( "over", 5 ); myTargetArray.SetValue( "the", 6 ); myTargetArray.SetValue( "lazy", 7 ); myTargetArray.SetValue( "dog", 8 ); // Displays the values of the target Array. Console.WriteLine( "The target Array contains the following (before and after copying):" ); PrintValues( myTargetArray, ' ' ); // Copies the second element from the source ArrayList to the target ArrayList, starting at index 7. mySourceList.CopyTo( 1, myTargetArray, 7, 1 ); // Displays the values of the target Array. PrintValues( myTargetArray, ' ' ); // Copies the entire source ArrayList to the target ArrayList, starting at index 6. mySourceList.CopyTo( myTargetArray, 6 ); // Displays the values of the target Array. PrintValues( myTargetArray, ' ' ); // Copies the entire source ArrayList to the target ArrayList, starting at index 0. mySourceList.CopyTo( myTargetArray ); // Displays the values of the target Array. PrintValues( myTargetArray, ' ' ); } public static void PrintValues( Array myArr, char mySeparator ) { System.Collections.IEnumerator myEnumerator = myArr.GetEnumerator(); int i = 0; int cols = myArr.GetLength( myArr.Rank - 1 ); while ( myEnumerator.MoveNext() ) { if ( i < cols ) { i++; } else { Console.WriteLine(); i = 1; } Console.Write( "{0}{1}", mySeparator, myEnumerator.Current ); } Console.WriteLine(); } } /* This code produces the following output. The target Array contains the following (before and after copying): The quick brown fox jumped over the lazy dog The quick brown fox jumped over the napping dog The quick brown fox jumped over three napping cats in the barn three napping cats in the barn three napping cats in the barn */ --- NEW FILE: arraylist2.cs --- using System; using system.collections; class Deneme { int x; public Deneme(int x) { this.x = x; } } class Koleksiyon { public static void Main() { Arraylist Alist = new Arraylist(); Alist.Add("Sefer"); Alist.Add("Algan"); Alist.Add("Gökçen"); Alist.Add("Yýldýrým"); Deneme d new Deneme(5); Alist.Add(d); foreach(object i in Alist) Console.WriteLine((string)i); } } --- NEW FILE: 2.sort.cs --- using System; using System.Collections; public class SamplesArrayList { public static void Main() { // Yeni bir arraylist oluþtururuz. ArrayList myAL = new ArrayList(); myAL.Add( "The" ); myAL.Add( "quick" ); myAL.Add( "brown" ); myAL.Add( "fox" ); myAL.Add( "jumps" ); myAL.Add( "over" ); myAL.Add( "the" ); myAL.Add( "lazy" ); myAL.Add( "dog" ); //ArrayListteki deðerler göstermek için. Console.WriteLine("Alist þu an aþaðýda yazýlanlarý içermektedir."); PrintIndexAndValues( myAL ); // ArrayListtekileri sýralar. myAL.Sort(); // ArrayListteki deðerleri göstermek için. Console.WriteLine( "Sýralamanýn ardýndan:" ); PrintIndexAndValues( myAL ); } public static void PrintIndexAndValues( IEnumerable myList ) { int i = 0; System.Collections.IEnumerator myEnumerator = myList.GetEnumerator(); while ( myEnumerator.MoveNext() ) Console.WriteLine( "\t[{0}]:\t{1}", i++, myEnumerator.Current ); Console.WriteLine(); } } /* This code produces the following output. The ArrayList initially contains the following values: [0]: The [1]: quick [2]: brown [3]: fox [4]: jumps [5]: over [6]: the [7]: lazy [8]: dog After sorting: [0]: brown [1]: dog [2]: fox [3]: jumps [4]: lazy [5]: over [6]: quick [7]: the [8]: The */ --- NEW FILE: 1.Addrange.cs --- using System; using System.Collections; public class SamplesArrayList { public static void Main() { // Yeni bir arraylist oluþtururuz. ArrayList alist = new ArrayList(); alist.Add( "The" ); alist.Add( "quick" ); alist.Add( "brown" ); alist.Add( "fox" ); // oluþturulmuþ Alistin arkasýna ekleyeceðimiz cümleyi yazarýz. Queue listearkasi = new Queue(); listearkasi.Enqueue( "jumped" ); listearkasi.Enqueue( "over" ); listearkasi.Enqueue( "the" ); listearkasi.Enqueue( "lazy" ); listearkasi.Enqueue( "dog" ); Console.WriteLine( "Arraylist:" ); PrintValues( alist, '\t' ); Console.WriteLine( "Listearkasý" ); PrintValues( listearkasi, '\t' ); // Daha sonradan oluþturulmuþ cümleyi alist'in sonuna kopyalarýz. alist.AddRange( listearkasi ); // Console.WriteLine( "Alist þu an aþaðýda yazýlanlarý içermektedir." ); PrintValues( alist, '\t' ); } public static void PrintValues( IEnumerable myList, char mySeparator ) { System.Collections.IEnumerator myEnumerator = myList.GetEnumerator(); while ( myEnumerator.MoveNext() ) Console.Write( "{0}{1}", mySeparator, myEnumerator.Current ); Console.WriteLine(); } } /* Kodun ekran çýktýsý. AList aþaðýdakileri içermektedir.: The quick brown fox Queue aþaðýdakileri içermektedir.: jumped over the lazy dog AList þu an aþaðýdakileri içermektedir.: The quick brown fox jumped over the lazy dog */ --- NEW FILE: capacity.cs --- using system; using system.collections; class Koleksiyon { public static void Main() { Arraylist Alist= new ArrayList(2); Alist.Add(1); Alist.Add(2); Alist.Add(3); Alist.Add(4); Alist.Add(5); Console.writeline(Alist.Capacity); } } --- NEW FILE: ARRAYLIST SINIFI.doc --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 6.Binarysearch(object o).cs --- using System; using System.Collections; public class SamplesArrayList { public static void Main() { // Yeni bir arraylist oluþtururuz ve baþlangýç durumuna getiririz. ArrayList myAL = new ArrayList(); for ( int i = 0; i <= 4; i++ ) myAL.Add( i*2 ); // Arraylistin ilk durumunu gösterir. Console.WriteLine( "The Int32 ArrayList aþaðýdakileri gösterir:" ); PrintValues( myAL ); // Arraylistte olmayan bir eleman aratýrýz. Object myObjectOdd = 3; FindMyObject( myAL, myObjectOdd ); //ArrayListte bulunan bir nesne aratýrýz. Object myObjectEven = 6; FindMyObject( myAL, myObjectEven ); } public static void FindMyObject( ArrayList myList, Object myObject ) { int myIndex=myList.BinarySearch( myObject ); if ( myIndex < 0 ) Console.WriteLine( "Aratýlan eleman ({0}) bulunamadý.en yakýn index {1}.", myObject, ~myIndex ); else Console.WriteLine("Aratýlan eleman ({0}) index {1} de.", myObject, myIndex); } public static void PrintValues( IEnumerable myList ) { System.Collections.IEnumerator myEnumerator = myList.GetEnumerator(); while ( myEnumerator.MoveNext() ) Console.Write( "\t{0}", myEnumerator.Current ); Console.WriteLine(); } } /* This code produces the following output. The Int32 ArrayList contains the following: 0 2 4 6 8 The object to search for (3) is not found. The next larger object is at index 2. The object to search for (6) is at index 3. */ |