<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ergin TIRAVOĞLU</title>
	<atom:link href="http://www.tiravoglu.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tiravoglu.com</link>
	<description>C# Asp.net MVC jQuery</description>
	<lastBuildDate>Tue, 13 Dec 2011 05:40:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Guid() den daha kısa uniqe id</title>
		<link>http://www.tiravoglu.com/index.php/guid-den-daha-kisa-uniqe-id/</link>
		<comments>http://www.tiravoglu.com/index.php/guid-den-daha-kisa-uniqe-id/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 05:40:58 +0000</pubDate>
		<dc:creator>blogadmin</dc:creator>
				<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://www.tiravoglu.com/?p=142</guid>
		<description><![CDATA[<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><div style="display:inline;float:right;margin-left:1em"><script type="IN/Share" data-url="http://www.tiravoglu.com/index.php/guid-den-daha-kisa-uniqe-id/" data-counter="right"></script></div><div style="display:inline;float:right;margin-left:1em"><g:plusone href="http://www.tiravoglu.com/index.php/guid-den-daha-kisa-uniqe-id/"></g:plusone></div>
Kayıt içerisinde tekil id için kullanılan guid in uzun olduğunu düşünüyorsanız, onun yerine aşağıdaki fonksiyonu kullanın, ama üretilen sayı/harf silsilesi ne kadar uzun olsada çok düşük ihtimallede olsa tekil olmayacaktır, o yüzden yinede kayıt sırasında kontrol edilmesi gerekir. Alıntı yaptığım sayfa bitly yada goo.gl gibi kısaltma url projesi için hazırlanmış. &#160; private static string shorturl_chars_lcase [...]]]></description>
			<content:encoded><![CDATA[<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><div style="display:inline;float:right;margin-left:1em"><script type="IN/Share" data-url="http://www.tiravoglu.com/index.php/guid-den-daha-kisa-uniqe-id/" data-counter="right"></script></div><div style="display:inline;float:right;margin-left:1em"><g:plusone href="http://www.tiravoglu.com/index.php/guid-den-daha-kisa-uniqe-id/"></g:plusone></div>
<p>Kayıt içerisinde tekil id için kullanılan guid in uzun olduğunu düşünüyorsanız, onun yerine aşağıdaki fonksiyonu kullanın, ama üretilen sayı/harf silsilesi ne kadar uzun olsada çok düşük ihtimallede olsa tekil olmayacaktır, o yüzden yinede kayıt sırasında kontrol edilmesi gerekir. Alıntı yaptığım sayfa bitly yada goo.gl gibi kısaltma url projesi için hazırlanmış.</p>
<p>&nbsp;</p>
<pre class="brush: csharp; gutter: true">        private static string shorturl_chars_lcase = "abcdefgijkmnopqrstwxyz";
        private static string shorturl_chars_ucase = "ABCDEFGHJKLMNPQRSTWXYZ";
        private static string shorturl_chars_numeric = "23456789";

        public static string RandomCharacters(int feedCount)//feedCount burada tekil kodun uzunluğu
        {
            // Create a local array containing supported short-url characters
            // grouped by types.
            char[][] charGroups = new char[][]
            {
                shorturl_chars_lcase.ToCharArray(),
                shorturl_chars_ucase.ToCharArray(),
                shorturl_chars_numeric.ToCharArray()
            };

            // Use this array to track the number of unused characters in each
            // character group.
            int[] charsLeftInGroup = new int[charGroups.Length];

            // Initially, all characters in each group are not used.
            for (int i = 0; i &lt; charsLeftInGroup.Length; i++)
                charsLeftInGroup[i] = charGroups[i].Length;

            // Use this array to track (iterate through) unused character groups.
            int[] leftGroupsOrder = new int[charGroups.Length];

            // Initially, all character groups are not used.
            for (int i = 0; i &lt; leftGroupsOrder.Length; i++)
                leftGroupsOrder[i] = i;

            // Because we cannot use the default randomizer, which is based on the
            // current time (it will produce the same "random" number within a
            // second), we will use a random number generator to seed the
            // randomizer.

            // Use a 4-byte array to fill it with random bytes and convert it then
            // to an integer value.
            byte[] randomBytes = new byte[4];

            // Generate 4 random bytes.
            RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
            rng.GetBytes(randomBytes);

            // Convert 4 bytes into a 32-bit integer value.
            int seed = (randomBytes[0] &amp; 0x7f) &lt;&lt; 24 |
                        randomBytes[1] &lt;&lt; 16 |
                        randomBytes[2] &lt;&lt; 8 |
                        randomBytes[3];

            // Now, this is real randomization.
            Random random = new Random(seed);

            // This array will hold short-url characters.
            char[] short_url = null;

            // Allocate appropriate memory for the short-url.
            short_url = new char[random.Next(feedCount, feedCount)];

            // Index of the next character to be added to short-url.
            int nextCharIdx;

            // Index of the next character group to be processed.
            int nextGroupIdx;

            // Index which will be used to track not processed character groups.
            int nextLeftGroupsOrderIdx;

            // Index of the last non-processed character in a group.
            int lastCharIdx;

            // Index of the last non-processed group.
            int lastLeftGroupsOrderIdx = leftGroupsOrder.Length - 1;

            // Generate short-url characters one at a time.
            for (int i = 0; i &lt; short_url.Length; i++)
            {
                // If only one character group remained unprocessed, process it;
                // otherwise, pick a random character group from the unprocessed
                // group list. To allow a special character to appear in the
                // first position, increment the second parameter of the Next
                // function call by one, i.e. lastLeftGroupsOrderIdx + 1.
                if (lastLeftGroupsOrderIdx == 0)
                    nextLeftGroupsOrderIdx = 0;
                else
                    nextLeftGroupsOrderIdx = random.Next(0,
                                                         lastLeftGroupsOrderIdx);

                // Get the actual index of the character group, from which we will
                // pick the next character.
                nextGroupIdx = leftGroupsOrder[nextLeftGroupsOrderIdx];

                // Get the index of the last unprocessed characters in this group.
                lastCharIdx = charsLeftInGroup[nextGroupIdx] - 1;

                // If only one unprocessed character is left, pick it; otherwise,
                // get a random character from the unused character list.
                if (lastCharIdx == 0)
                    nextCharIdx = 0;
                else
                    nextCharIdx = random.Next(0, lastCharIdx + 1);

                // Add this character to the short-url.
                short_url[i] = charGroups[nextGroupIdx][nextCharIdx];

                // If we processed the last character in this group, start over.
                if (lastCharIdx == 0)
                    charsLeftInGroup[nextGroupIdx] =
                                              charGroups[nextGroupIdx].Length;
                // There are more unprocessed characters left.
                else
                {
                    // Swap processed character with the last unprocessed character
                    // so that we don't pick it until we process all characters in
                    // this group.
                    if (lastCharIdx != nextCharIdx)
                    {
                        char temp = charGroups[nextGroupIdx][lastCharIdx];
                        charGroups[nextGroupIdx][lastCharIdx] =
                                    charGroups[nextGroupIdx][nextCharIdx];
                        charGroups[nextGroupIdx][nextCharIdx] = temp;
                    }
                    // Decrement the number of unprocessed characters in
                    // this group.
                    charsLeftInGroup[nextGroupIdx]--;
                }

                // If we processed the last group, start all over.
                if (lastLeftGroupsOrderIdx == 0)
                    lastLeftGroupsOrderIdx = leftGroupsOrder.Length - 1;
                // There are more unprocessed groups left.
                else
                {
                    // Swap processed group with the last unprocessed group
                    // so that we don't pick it until we process all groups.
                    if (lastLeftGroupsOrderIdx != nextLeftGroupsOrderIdx)
                    {
                        int temp = leftGroupsOrder[lastLeftGroupsOrderIdx];
                        leftGroupsOrder[lastLeftGroupsOrderIdx] =
                                    leftGroupsOrder[nextLeftGroupsOrderIdx];
                        leftGroupsOrder[nextLeftGroupsOrderIdx] = temp;
                    }
                    // Decrement the number of unprocessed groups.
                    lastLeftGroupsOrderIdx--;
                }
            }

            // Convert password characters into a string and return the result.
            return new string(short_url);
        }</pre>
<p><a href="http://www.java-frameworks.com/csharp/shorturldotnet/ShortUrl.Utils.cs.html" target="_blank">http://www.java-frameworks.com/csharp/shorturldotnet/ShortUrl.Utils.cs.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tiravoglu.com/index.php/guid-den-daha-kisa-uniqe-id/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linqtosql Transaction İşlemi</title>
		<link>http://www.tiravoglu.com/index.php/linqtosql-transaction-islemi/</link>
		<comments>http://www.tiravoglu.com/index.php/linqtosql-transaction-islemi/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 23:53:51 +0000</pubDate>
		<dc:creator>blogadmin</dc:creator>
				<category><![CDATA[c#]]></category>
		<category><![CDATA[linq2sql]]></category>
		<category><![CDATA[linqtosql]]></category>
		<category><![CDATA[transaction]]></category>

		<guid isPermaLink="false">http://www.tiravoglu.com/?p=138</guid>
		<description><![CDATA[<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><div style="display:inline;float:right;margin-left:1em"><script type="IN/Share" data-url="http://www.tiravoglu.com/index.php/linqtosql-transaction-islemi/" data-counter="right"></script></div><div style="display:inline;float:right;margin-left:1em"><g:plusone href="http://www.tiravoglu.com/index.php/linqtosql-transaction-islemi/"></g:plusone></div>
&#160; Product prod = q.Single(p =&#62; p.ProductId == 15); if (prod.UnitsInStock &#62; 0) prod.UnitsInStock--; db.Transaction = db.Connection.BeginTransaction(); try { db.SubmitChanges(); db.Transaction.Commit(); } catch { db.Transaction.Rollback(); throw; } finally { db.Transaction = null; } &#160;]]></description>
			<content:encoded><![CDATA[<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><div style="display:inline;float:right;margin-left:1em"><script type="IN/Share" data-url="http://www.tiravoglu.com/index.php/linqtosql-transaction-islemi/" data-counter="right"></script></div><div style="display:inline;float:right;margin-left:1em"><g:plusone href="http://www.tiravoglu.com/index.php/linqtosql-transaction-islemi/"></g:plusone></div>
<p>&nbsp;</p>
<pre class="brush: csharp; gutter: true">Product prod = q.Single(p =&gt; p.ProductId == 15);

if (prod.UnitsInStock &gt; 0)
   prod.UnitsInStock--;

db.Transaction = db.Connection.BeginTransaction();
try {
   db.SubmitChanges();
   db.Transaction.Commit();
}
catch {
   db.Transaction.Rollback();
   throw;
}
finally {
   db.Transaction = null;
}</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tiravoglu.com/index.php/linqtosql-transaction-islemi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# Projesi OutlookBridgeFBF</title>
		<link>http://www.tiravoglu.com/index.php/c-projesi-outlookbridgefbf/</link>
		<comments>http://www.tiravoglu.com/index.php/c-projesi-outlookbridgefbf/#comments</comments>
		<pubDate>Sat, 02 Jul 2011 19:04:42 +0000</pubDate>
		<dc:creator>blogadmin</dc:creator>
				<category><![CDATA[c#]]></category>
		<category><![CDATA[proje]]></category>
		<category><![CDATA[c# proje]]></category>
		<category><![CDATA[outlookbridgefbf]]></category>

		<guid isPermaLink="false">http://www.tiravoglu.com/?p=105</guid>
		<description><![CDATA[<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><div style="display:inline;float:right;margin-left:1em"><script type="IN/Share" data-url="http://www.tiravoglu.com/index.php/c-projesi-outlookbridgefbf/" data-counter="right"></script></div><div style="display:inline;float:right;margin-left:1em"><g:plusone href="http://www.tiravoglu.com/index.php/c-projesi-outlookbridgefbf/"></g:plusone></div>
2010 da meraktan yazdığım, outlook ile senkronize çalışan windows mobile 6.5 telefonumdaki kişilerin birçoğunun fotoğraflarını facebook arkadaş listemden alıp, outlook&#8217;uma kayıt etmeme yarayan programcık, böylelikle telefonu senkronize ettiğimde arayan/aranan kişinin resmini de görmemi sağlıyordu. http://www.tiravoglu.com/index.php/c-ta-web-sayfasindaki-resmi-image-olarak-cekme/ http://www.tiravoglu.com/index.php/c-la-facebook-uygulamasi-ve-arkadas-resimlerine-ulasmak/ http://www.tiravoglu.com/index.php/c-la-outlooktaki-kisilerin-resimlerine-ulasin/ http://www.tiravoglu.com/index.php/c-la-outlooktaki-kisilerin-resimlerini-degistirin/ Sol tarafta Facebook arkadaş listesindeki kişiye tıklayıp ardından sağ tarafta o kişin outlook ismine tıklayıp, butona basınca [...]]]></description>
			<content:encoded><![CDATA[<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><div style="display:inline;float:right;margin-left:1em"><script type="IN/Share" data-url="http://www.tiravoglu.com/index.php/c-projesi-outlookbridgefbf/" data-counter="right"></script></div><div style="display:inline;float:right;margin-left:1em"><g:plusone href="http://www.tiravoglu.com/index.php/c-projesi-outlookbridgefbf/"></g:plusone></div>
<p>2010 da meraktan yazdığım, outlook ile senkronize çalışan windows mobile 6.5 telefonumdaki kişilerin birçoğunun fotoğraflarını facebook arkadaş listemden alıp, outlook&#8217;uma kayıt etmeme yarayan programcık, böylelikle telefonu senkronize ettiğimde arayan/aranan kişinin resmini de görmemi sağlıyordu.</p>
<p><a title="C# ta web sayfasındaki resmi Image olarak çekme." href="http://www.tiravoglu.com/index.php/c-ta-web-sayfasindaki-resmi-image-olarak-cekme/" target="_blank">http://www.tiravoglu.com/index.php/c-ta-web-sayfasindaki-resmi-image-olarak-cekme/</a></p>
<p><a title="C# la Facebook uygulaması ve arkadaş resimlerine ulaşmak" href="http://www.tiravoglu.com/index.php/c-la-facebook-uygulamasi-ve-arkadas-resimlerine-ulasmak/" target="_blank">http://www.tiravoglu.com/index.php/c-la-facebook-uygulamasi-ve-arkadas-resimlerine-ulasmak/</a></p>
<p><a title="C# la Outlook’taki kişilerin resimlerine ulaşın" href="http://www.tiravoglu.com/index.php/c-la-outlooktaki-kisilerin-resimlerine-ulasin/" target="_blank">http://www.tiravoglu.com/index.php/c-la-outlooktaki-kisilerin-resimlerine-ulasin/</a></p>
<p><a title="C# la Outlook’taki kişilerin resimlerini değiştirin" href="http://www.tiravoglu.com/index.php/c-la-outlooktaki-kisilerin-resimlerini-degistirin/" target="_blank">http://www.tiravoglu.com/index.php/c-la-outlooktaki-kisilerin-resimlerini-degistirin/</a></p>
<p><img class="alignnone size-full wp-image-106" title="outlookbridgefbf" src="http://www.tiravoglu.com/wp-content/uploads/2011/07/fb-outlookbridgefbf-1.jpg" alt="outlookbridgefbf" width="450" height="343" /></p>
<p>Sol tarafta Facebook arkadaş listesindeki kişiye tıklayıp ardından sağ tarafta o kişin outlook ismine tıklayıp, butona basınca facebook resmini bilgisayara indirip ardından outlooktaki resmini silip yerine facebooktan indirdiği resmi kayıt ediyor.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tiravoglu.com/index.php/c-projesi-outlookbridgefbf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# la Outlook&#8217;taki kişilerin resimlerini değiştirin</title>
		<link>http://www.tiravoglu.com/index.php/c-la-outlooktaki-kisilerin-resimlerini-degistirin/</link>
		<comments>http://www.tiravoglu.com/index.php/c-la-outlooktaki-kisilerin-resimlerini-degistirin/#comments</comments>
		<pubDate>Sat, 02 Jul 2011 18:29:18 +0000</pubDate>
		<dc:creator>blogadmin</dc:creator>
				<category><![CDATA[c#]]></category>
		<category><![CDATA[la serisi]]></category>
		<category><![CDATA[outlook]]></category>
		<category><![CDATA[outlook kişiler]]></category>
		<category><![CDATA[outlook kişilerin resimleri]]></category>
		<category><![CDATA[outlook kişilerin resimlerini değiştirme]]></category>

		<guid isPermaLink="false">http://www.tiravoglu.com/?p=100</guid>
		<description><![CDATA[<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><div style="display:inline;float:right;margin-left:1em"><script type="IN/Share" data-url="http://www.tiravoglu.com/index.php/c-la-outlooktaki-kisilerin-resimlerini-degistirin/" data-counter="right"></script></div><div style="display:inline;float:right;margin-left:1em"><g:plusone href="http://www.tiravoglu.com/index.php/c-la-outlooktaki-kisilerin-resimlerini-degistirin/"></g:plusone></div>
Listview&#8217;de listelenmiş Outlook kişilerden seçili olanın resmini değiştirmek için; (listView1&#8242;de facebook arkadaş listesindekilerin resimleri listView2&#8242;de ise outlook kişilerdeki kayıtlı kişilerin resimleri var, aşağıdaki kodlar, listView1&#8242;de ki resmi alıp, listView2 &#8216;de seçili olan outlook kişinin resmi olarak kayıt eder) using Outlook = Microsoft.Office.Interop.Outlook; Outlook._Application outobj; Outlook.MAPIFolder fldContacts; Microsoft.Office.Interop.Outlook.ContactItem contact; if (listView2.SelectedItems.Count == 1 &#38;&#38; listView1.SelectedItems.Count == [...]]]></description>
			<content:encoded><![CDATA[<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><div style="display:inline;float:right;margin-left:1em"><script type="IN/Share" data-url="http://www.tiravoglu.com/index.php/c-la-outlooktaki-kisilerin-resimlerini-degistirin/" data-counter="right"></script></div><div style="display:inline;float:right;margin-left:1em"><g:plusone href="http://www.tiravoglu.com/index.php/c-la-outlooktaki-kisilerin-resimlerini-degistirin/"></g:plusone></div>
<p>Listview&#8217;de listelenmiş Outlook kişilerden seçili olanın resmini değiştirmek için; (<a title="C# la Facebook uygulaması ve arkadaş resimlerine ulaşmak" href="http://www.tiravoglu.com/index.php/c-la-facebook-uygulamasi-ve-arkadas-resimlerine-ulasmak/">listView1&#8242;de facebook arkadaş listesinde</a>kilerin resimleri<a title="C# la Outlook’taki kişilerin resimlerine ulaşın" href="http://www.tiravoglu.com/index.php/c-la-outlooktaki-kisilerin-resimlerine-ulasin/"> listView2&#8242;de ise outlook kişilerdeki kayıtlı kişilerin</a> resimleri var, aşağıdaki kodlar, listView1&#8242;de ki resmi alıp, listView2 &#8216;de seçili olan outlook kişinin resmi olarak kayıt eder)</p>
<pre class="brush: csharp; gutter: true; first-line: 1">using Outlook = Microsoft.Office.Interop.Outlook;</pre>
<pre class="brush: csharp; gutter: true; first-line: 1">Outlook._Application outobj;
Outlook.MAPIFolder fldContacts;
Microsoft.Office.Interop.Outlook.ContactItem contact;</pre>
<pre class="brush: csharp; gutter: true; first-line: 1"> if (listView2.SelectedItems.Count == 1 &amp;&amp; listView1.SelectedItems.Count == 1)
            {

                contact = (Microsoft.Office.Interop.Outlook.ContactItem)fldContacts.Items[listView2.SelectedItems[0].Index + 1];
                if (contact.HasPicture)
                {
                    contact.RemovePicture();

                }

                Image _Image = null;
                _Image = DownloadImage(friends[listView1.SelectedItems[0].Index].pic);

                if (_Image != null)
                {

                    _Image.Save(@"C:\outlookbridgefb" + listView1.SelectedItems[0].Index + ".jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
                }

                contact.AddPicture(@"c:\outlookbridgefb" + listView1.SelectedItems[0].Index + ".jpg");
                contact.Save();
                try
                {
                    System.IO.File.Delete(@"c:\outlookbridgefb" + listView1.SelectedItems[0].Index + ".jpg");
                }
                catch
                {

                }

               // outlookkontaktdoldur();

            }</pre>
<p>Outlookta&#8217;ki kişilerin resimlerine nasıl ulaşırım diyorsanız -&gt; <a title="C# la Outlook’taki kişilerin resimlerine ulaşın" href="http://www.tiravoglu.com/index.php/c-la-outlooktaki-kisilerin-resimlerine-ulasin/" target="_blank">C# la Outlook’taki kişilerin resimlerine ulaşın</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tiravoglu.com/index.php/c-la-outlooktaki-kisilerin-resimlerini-degistirin/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>C# la Facebook uygulaması ve arkadaş resimlerine ulaşmak</title>
		<link>http://www.tiravoglu.com/index.php/c-la-facebook-uygulamasi-ve-arkadas-resimlerine-ulasmak/</link>
		<comments>http://www.tiravoglu.com/index.php/c-la-facebook-uygulamasi-ve-arkadas-resimlerine-ulasmak/#comments</comments>
		<pubDate>Sat, 02 Jul 2011 18:19:27 +0000</pubDate>
		<dc:creator>blogadmin</dc:creator>
				<category><![CDATA[c#]]></category>
		<category><![CDATA[facebook arkadaş listesi]]></category>
		<category><![CDATA[facebook arkadaş listesi resimleri]]></category>
		<category><![CDATA[facebook uygulama]]></category>
		<category><![CDATA[la serisi]]></category>

		<guid isPermaLink="false">http://www.tiravoglu.com/?p=90</guid>
		<description><![CDATA[<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><div style="display:inline;float:right;margin-left:1em"><script type="IN/Share" data-url="http://www.tiravoglu.com/index.php/c-la-facebook-uygulamasi-ve-arkadas-resimlerine-ulasmak/" data-counter="right"></script></div><div style="display:inline;float:right;margin-left:1em"><g:plusone href="http://www.tiravoglu.com/index.php/c-la-facebook-uygulamasi-ve-arkadas-resimlerine-ulasmak/"></g:plusone></div>
Facebook api kullanarak yazdığınız uygulamanın, o uygulamayı kullanan kişinin arkadaşlarının resimlerine ulaşması için aşağıdaki koda bi göz atın.  Facebook arkadaşlarının resimlerini ListView içerisinde arkadaş adı ile birlikte gösterir. https://www.facebook.com/developers/createapp.php bu adresten yeni bir uygulama oluşturup, aşağıdaki &#8220;API Anahtarı&#8221; yazan yere yeni uygulamanın api anahtarını yazın. using Facebook.Session; using Facebook.Schema; DesktopSession ds = new DesktopSession("API Anahtarı", [...]]]></description>
			<content:encoded><![CDATA[<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><div style="display:inline;float:right;margin-left:1em"><script type="IN/Share" data-url="http://www.tiravoglu.com/index.php/c-la-facebook-uygulamasi-ve-arkadas-resimlerine-ulasmak/" data-counter="right"></script></div><div style="display:inline;float:right;margin-left:1em"><g:plusone href="http://www.tiravoglu.com/index.php/c-la-facebook-uygulamasi-ve-arkadas-resimlerine-ulasmak/"></g:plusone></div>
<p>Facebook api kullanarak yazdığınız uygulamanın, o uygulamayı kullanan kişinin arkadaşlarının resimlerine ulaşması için aşağıdaki koda bi göz atın.  Facebook arkadaşlarının resimlerini ListView içerisinde arkadaş adı ile birlikte gösterir.</p>
<p><a title="Facebook yeni uygulama" href="https://www.facebook.com/developers/createapp.php" target="_blank">https://www.facebook.com/developers/createapp.php</a> bu adresten yeni bir uygulama oluşturup, aşağıdaki &#8220;<em id="trans__80508be9d3bed845f4450345cf2d85ab__tr_TR__4__1__3059009">API Anahtarı</em>&#8221; yazan yere yeni uygulamanın api anahtarını yazın.<span id="more-90"></span></p>
<pre class="brush: csharp; gutter: true; first-line: 1">using Facebook.Session;
using Facebook.Schema;</pre>
<pre class="brush: csharp; gutter: true; first-line: 1">DesktopSession ds = new DesktopSession("<em id="trans__80508be9d3bed845f4450345cf2d85ab__tr_TR__4__1__3059009">API Anahtarı</em>", true);
        IList&lt;user&gt; friends;
        private void button1_Click(object sender, EventArgs e)
        {
            ds.LoginCompleted += new EventHandler&lt;AsyncCompletedEventArgs&gt;(ds_LoginCompleted);
            ds.LogoutCompleted += new EventHandler&lt;AsyncCompletedEventArgs&gt;(ds_LogoutCompleted);
            button2.Enabled = false;
            ds.Login();
        }</pre>
<pre class="brush: csharp; gutter: true; first-line: 1">void ds_LogoutCompleted(object sender, AsyncCompletedEventArgs e)
        {
            button2.Enabled = false;
        }

        void ds_LoginCompleted(object sender, AsyncCompletedEventArgs e)
        {

            button2.Enabled = true;
            label1.Text = ds.UserId.ToString();
            facebookService1.ApplicationKey = ds.ApplicationKey;
            facebookService1.SessionKey = ds.SessionKey;
            facebookService1.uid = ds.UserId;
            facebookService1.ConnectToFacebook();
            facebookService1.Users.Session.SessionSecret = ds.SessionSecret;
            friends = facebookService1.Friends.GetUserObjects();
            int sira = 0;
            listView1.LargeImageList = ımageList1;

            foreach (user fr in friends)
            {
                ımageList1.Images.Add(sira.ToString(), fr.picture);
                listView1.Items.Add(new ListViewItem(fr.name, sira.ToString()));
                sira = sira + 1;
            }
            //outlookkontaktdoldur();
        }</pre>
<p>Facebook login giriş ekranı;</p>
<p><img class="alignnone size-full wp-image-91" title="facebook login ekranı" src="http://www.tiravoglu.com/wp-content/uploads/2011/07/fb-login-1.jpg" alt="facebook login ekranı" width="450" height="311" /></p>
<p>Facebook uygulamaya izin ekranı;</p>
<p><img class="alignnone size-full wp-image-92" title="facebook uygulama izin" src="http://www.tiravoglu.com/wp-content/uploads/2011/07/fb-login-2.jpg" alt="facebook uygulama izin" width="450" height="306" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tiravoglu.com/index.php/c-la-facebook-uygulamasi-ve-arkadas-resimlerine-ulasmak/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>C# la Outlook&#8217;taki kişilerin resimlerine ulaşın</title>
		<link>http://www.tiravoglu.com/index.php/c-la-outlooktaki-kisilerin-resimlerine-ulasin/</link>
		<comments>http://www.tiravoglu.com/index.php/c-la-outlooktaki-kisilerin-resimlerine-ulasin/#comments</comments>
		<pubDate>Sat, 02 Jul 2011 18:00:47 +0000</pubDate>
		<dc:creator>blogadmin</dc:creator>
				<category><![CDATA[c#]]></category>
		<category><![CDATA[la serisi]]></category>
		<category><![CDATA[outlook]]></category>
		<category><![CDATA[outlook kişiler]]></category>
		<category><![CDATA[outlook kişilerin resimleri]]></category>

		<guid isPermaLink="false">http://www.tiravoglu.com/?p=86</guid>
		<description><![CDATA[<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><div style="display:inline;float:right;margin-left:1em"><script type="IN/Share" data-url="http://www.tiravoglu.com/index.php/c-la-outlooktaki-kisilerin-resimlerine-ulasin/" data-counter="right"></script></div><div style="display:inline;float:right;margin-left:1em"><g:plusone href="http://www.tiravoglu.com/index.php/c-la-outlooktaki-kisilerin-resimlerine-ulasin/"></g:plusone></div>
Outlook&#8217;taki  kişilerin resimlerini görmek ve ListView&#8217;in içine doldurmak için; using Outlook = Microsoft.Office.Interop.Outlook; Outlook._Application outobj; Outlook.MAPIFolder fldContacts; Microsoft.Office.Interop.Outlook.ContactItem contact; listView2.Clear(); ımageList2.Images.Clear(); outobj = new Outlook.Application(); fldContacts = (Outlook.MAPIFolder)outobj.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts); int sira2 = 0; listView2.LargeImageList = ımageList2; foreach (Outlook._ContactItem kontakt in fldContacts.Items) { if (kontakt.HasPicture) { contact = (Microsoft.Office.Interop.Outlook.ContactItem)kontakt; ımageList2.Images.Add(sira2.ToString(), Image.FromFile(GetContactPicturePath(contact))); } listView2.Items.Add(new ListViewItem(kontakt.FullName, sira2.ToString())); sira2 = [...]]]></description>
			<content:encoded><![CDATA[<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><div style="display:inline;float:right;margin-left:1em"><script type="IN/Share" data-url="http://www.tiravoglu.com/index.php/c-la-outlooktaki-kisilerin-resimlerine-ulasin/" data-counter="right"></script></div><div style="display:inline;float:right;margin-left:1em"><g:plusone href="http://www.tiravoglu.com/index.php/c-la-outlooktaki-kisilerin-resimlerine-ulasin/"></g:plusone></div>
<p>Outlook&#8217;taki  kişilerin resimlerini görmek ve ListView&#8217;in içine doldurmak için;</p>
<pre class="brush: csharp; gutter: true; first-line: 1">using Outlook = Microsoft.Office.Interop.Outlook;</pre>
<pre class="brush: csharp; gutter: true; first-line: 1">Outlook._Application outobj;
Outlook.MAPIFolder fldContacts;
Microsoft.Office.Interop.Outlook.ContactItem contact;</pre>
<pre class="brush: csharp; gutter: true; first-line: 1">listView2.Clear();
            ımageList2.Images.Clear();
            outobj = new Outlook.Application();
            fldContacts = (Outlook.MAPIFolder)outobj.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts);
            int sira2 = 0;

            listView2.LargeImageList = ımageList2;
            foreach (Outlook._ContactItem kontakt in fldContacts.Items)
            {
                if (kontakt.HasPicture)
                {
                    contact = (Microsoft.Office.Interop.Outlook.ContactItem)kontakt;
                    ımageList2.Images.Add(sira2.ToString(), Image.FromFile(GetContactPicturePath(contact)));

                }
                listView2.Items.Add(new ListViewItem(kontakt.FullName, sira2.ToString()));
                sira2 = sira2 + 1;
            }</pre>
<pre class="brush: csharp; gutter: true; first-line: 1">public static string GetContactPicturePath(Microsoft.Office.Interop.Outlook.ContactItem contact)
        {
            return GetContactPicturePath(contact, System.IO.Path.GetTempPath());
        }

        public static string GetContactPicturePath(Microsoft.Office.Interop.Outlook.ContactItem contact, string path)
        {
            string picturePath = "";
            if (contact.HasPicture)
            {
                foreach (Microsoft.Office.Interop.Outlook.Attachment att in contact.Attachments)
                {
                    if (att.DisplayName == "ContactPicture.jpg")
                    {
                        try
                        {
                            picturePath = System.IO.Path.GetDirectoryName(path) + "\\Contact_" + contact.EntryID + ".jpg";
                            if (!System.IO.File.Exists(picturePath))
                                att.SaveAsFile(picturePath);
                        }
                        catch
                        {
                            picturePath = "";
                        }
                    }
                }
            }
            return picturePath;
        }</pre>
<p>not:kodlar 2010 ve öncesine aittir, yeni yöntemler çıkmış olabilir.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tiravoglu.com/index.php/c-la-outlooktaki-kisilerin-resimlerine-ulasin/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>C# ta web sayfasındaki resmi Image olarak çekme.</title>
		<link>http://www.tiravoglu.com/index.php/c-ta-web-sayfasindaki-resmi-image-olarak-cekme/</link>
		<comments>http://www.tiravoglu.com/index.php/c-ta-web-sayfasindaki-resmi-image-olarak-cekme/#comments</comments>
		<pubDate>Sat, 02 Jul 2011 17:44:29 +0000</pubDate>
		<dc:creator>blogadmin</dc:creator>
				<category><![CDATA[c#]]></category>
		<category><![CDATA[HttpWebRequest]]></category>
		<category><![CDATA[resim çekme]]></category>
		<category><![CDATA[sitedeki resmi image olarak çekme]]></category>
		<category><![CDATA[ta serisi]]></category>

		<guid isPermaLink="false">http://www.tiravoglu.com/?p=83</guid>
		<description><![CDATA[<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><div style="display:inline;float:right;margin-left:1em"><script type="IN/Share" data-url="http://www.tiravoglu.com/index.php/c-ta-web-sayfasindaki-resmi-image-olarak-cekme/" data-counter="right"></script></div><div style="display:inline;float:right;margin-left:1em"><g:plusone href="http://www.tiravoglu.com/index.php/c-ta-web-sayfasindaki-resmi-image-olarak-cekme/"></g:plusone></div>
Önceden C# ta web sayfasındaki resmi Bitmap olarak çekme &#8216;yi paylaşmıştım. Nette bu kodun Image nesne olarak çeken halini buldum. public Image DownloadImage(string _URL) { Image _tmpImage = null; try { // Open a connection System.Net.HttpWebRequest _HttpWebRequest = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(_URL); _HttpWebRequest.AllowWriteStreamBuffering = true; // You can also specify additional header values like the user agent or [...]]]></description>
			<content:encoded><![CDATA[<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><div style="display:inline;float:right;margin-left:1em"><script type="IN/Share" data-url="http://www.tiravoglu.com/index.php/c-ta-web-sayfasindaki-resmi-image-olarak-cekme/" data-counter="right"></script></div><div style="display:inline;float:right;margin-left:1em"><g:plusone href="http://www.tiravoglu.com/index.php/c-ta-web-sayfasindaki-resmi-image-olarak-cekme/"></g:plusone></div>
<p>Önceden <a title="C# ta web sayfasındaki resmi Bitmap olarak çekme." href="http://www.tiravoglu.com/index.php/c-ta-web-sayfasindaki-resmi-bitmap-olarak-cekme/" target="_blank">C# ta web sayfasındaki resmi Bitmap olarak çekme</a> &#8216;yi paylaşmıştım. Nette bu kodun Image nesne olarak çeken halini buldum.</p>
<pre class="brush: csharp; gutter: true; first-line: 1">public Image DownloadImage(string _URL)
        {
            Image _tmpImage = null;

            try
            {
                // Open a connection
                System.Net.HttpWebRequest _HttpWebRequest = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(_URL);

                _HttpWebRequest.AllowWriteStreamBuffering = true;

                // You can also specify additional header values like the user agent or the referer: (Optional)
                _HttpWebRequest.UserAgent = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)";
                _HttpWebRequest.Referer = "http://www.google.com/";

                // set timeout for 20 seconds (Optional)
                _HttpWebRequest.Timeout = 20000;

                // Request response:
                System.Net.WebResponse _WebResponse = _HttpWebRequest.GetResponse();

                // Open data stream:
                System.IO.Stream _WebStream = _WebResponse.GetResponseStream();

                // convert webstream to image
                _tmpImage = Image.FromStream(_WebStream);

                // Cleanup
                _WebResponse.Close();
                _WebResponse.Close();
            }
            catch (Exception _Exception)
            {
                // Error
                Console.WriteLine("Exception caught in process: {0}", _Exception.ToString());
                return null;
            }

            return _tmpImage;
        }</pre>
<p>kullanımıda böyleymiş.</p>
<pre class="brush: csharp; gutter: true; first-line: 1">// Download web image
Image _Image = null;
_Image = DownloadImage("http://www.yourdomain.com/sample-image.jpg");

// check for valid image
if (_Image != null)
{
    // show image in picturebox
    pictureBox1.Image = _Image;

    // lets save image to disk
    _Image.Save(@"C:\SampleImage.jpg");
}</pre>
<p>kaynak: <a href="http://www.digitalcoding.com/Code-Snippets/C-Sharp/C-Code-Snippet-Download-Image-from-URL.html" target="_blank">http://www.digitalcoding.com/Code-Snippets/C-Sharp/C-Code-Snippet-Download-Image-from-URL.html</a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tiravoglu.com/index.php/c-ta-web-sayfasindaki-resmi-image-olarak-cekme/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>C# ta İki Tarih Arasındaki Toplam Ay Sayısı</title>
		<link>http://www.tiravoglu.com/index.php/c-ta-iki-tarih-arasindaki-toplam-ay-sayisi/</link>
		<comments>http://www.tiravoglu.com/index.php/c-ta-iki-tarih-arasindaki-toplam-ay-sayisi/#comments</comments>
		<pubDate>Sat, 25 Jun 2011 03:36:17 +0000</pubDate>
		<dc:creator>blogadmin</dc:creator>
				<category><![CDATA[c#]]></category>
		<category><![CDATA[ay hesaplama]]></category>
		<category><![CDATA[iki tarih arasındaki ay sayısı]]></category>
		<category><![CDATA[ta serisi]]></category>
		<category><![CDATA[tarih farkı]]></category>

		<guid isPermaLink="false">http://www.tiravoglu.com/?p=68</guid>
		<description><![CDATA[<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><div style="display:inline;float:right;margin-left:1em"><script type="IN/Share" data-url="http://www.tiravoglu.com/index.php/c-ta-iki-tarih-arasindaki-toplam-ay-sayisi/" data-counter="right"></script></div><div style="display:inline;float:right;margin-left:1em"><g:plusone href="http://www.tiravoglu.com/index.php/c-ta-iki-tarih-arasindaki-toplam-ay-sayisi/"></g:plusone></div>
Görünen oki C# ta iki tarih arasındaki toplam ay sayısını bulabilmenin en kolay yöntemi aşağıdaki yöntem olsa gerek. int ayFarki = 0; if (tarih2.Month &#60; tarih1.Month) { ayFarki = (tarih2.Month + (12 * (tarih2.Year - tarih1.Year))) - tarih1.Month; } else { ayFarki = (tarih1.Month - tarih2.Month) + (12 * (tarih2.Year - tarih1.Year)); } Daha kolay [...]]]></description>
			<content:encoded><![CDATA[<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><div style="display:inline;float:right;margin-left:1em"><script type="IN/Share" data-url="http://www.tiravoglu.com/index.php/c-ta-iki-tarih-arasindaki-toplam-ay-sayisi/" data-counter="right"></script></div><div style="display:inline;float:right;margin-left:1em"><g:plusone href="http://www.tiravoglu.com/index.php/c-ta-iki-tarih-arasindaki-toplam-ay-sayisi/"></g:plusone></div>
<p>Görünen oki C# ta iki tarih arasındaki toplam ay sayısını bulabilmenin en kolay yöntemi aşağıdaki yöntem olsa gerek.</p>
<pre class="brush: csharp; gutter: true; first-line: 1"> int ayFarki = 0;

if (tarih2.Month &lt; tarih1.Month)
{
        ayFarki = (tarih2.Month + (12 * (tarih2.Year - tarih1.Year))) - tarih1.Month;
}
else
{
        ayFarki = (tarih1.Month - tarih2.Month) + (12 * (tarih2.Year - tarih1.Year));
}</pre>
<p>Daha kolay yöntemini bilen varsa lütfen yazsın.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tiravoglu.com/index.php/c-ta-iki-tarih-arasindaki-toplam-ay-sayisi/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>C# ta web sayfasındaki resmi Bitmap olarak çekme.</title>
		<link>http://www.tiravoglu.com/index.php/c-ta-web-sayfasindaki-resmi-bitmap-olarak-cekme/</link>
		<comments>http://www.tiravoglu.com/index.php/c-ta-web-sayfasindaki-resmi-bitmap-olarak-cekme/#comments</comments>
		<pubDate>Tue, 21 Jun 2011 01:51:25 +0000</pubDate>
		<dc:creator>blogadmin</dc:creator>
				<category><![CDATA[c#]]></category>
		<category><![CDATA[resim çekme]]></category>
		<category><![CDATA[sitedeki resmi bitmap olarak çekme]]></category>
		<category><![CDATA[ta serisi]]></category>

		<guid isPermaLink="false">http://www.tiravoglu.com/?p=57</guid>
		<description><![CDATA[<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><div style="display:inline;float:right;margin-left:1em"><script type="IN/Share" data-url="http://www.tiravoglu.com/index.php/c-ta-web-sayfasindaki-resmi-bitmap-olarak-cekme/" data-counter="right"></script></div><div style="display:inline;float:right;margin-left:1em"><g:plusone href="http://www.tiravoglu.com/index.php/c-ta-web-sayfasindaki-resmi-bitmap-olarak-cekme/"></g:plusone></div>
Web sayfasında ki resmi kendi mü/web uygulamanızda Bitmap tipinde kullanabilmek için aşağıdaki kod işinizi görecektir. public static Bitmap ResimOku(string Adres) { HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(Adres); myRequest.Method = "GET"; HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse(); Bitmap bmp = new Bitmap(myResponse.GetResponseStream()); myResponse.Close(); return bmp; } &#8220;Adres&#8221; değişkenini full url olarak kullanmanız gerekmektedir. ResimOku(&#8220;http://www.tiravoglu.com/istediğiniz_resim.jpg&#8221;) şeklinde.]]></description>
			<content:encoded><![CDATA[<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><div style="display:inline;float:right;margin-left:1em"><script type="IN/Share" data-url="http://www.tiravoglu.com/index.php/c-ta-web-sayfasindaki-resmi-bitmap-olarak-cekme/" data-counter="right"></script></div><div style="display:inline;float:right;margin-left:1em"><g:plusone href="http://www.tiravoglu.com/index.php/c-ta-web-sayfasindaki-resmi-bitmap-olarak-cekme/"></g:plusone></div>
<p>Web sayfasında ki resmi kendi mü/web uygulamanızda Bitmap tipinde kullanabilmek için aşağıdaki kod işinizi görecektir.</p>
<pre class="brush: csharp; gutter: true; first-line: 1">	public static Bitmap ResimOku(string Adres)
        {
                HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(Adres);
                myRequest.Method = "GET";
                HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();
                Bitmap bmp = new Bitmap(myResponse.GetResponseStream());
                myResponse.Close();
                return bmp;
        }</pre>
<p>&#8220;Adres&#8221; değişkenini full url olarak kullanmanız gerekmektedir.<br />
ResimOku(&#8220;http://www.tiravoglu.com/istediğiniz_resim.jpg&#8221;) şeklinde.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tiravoglu.com/index.php/c-ta-web-sayfasindaki-resmi-bitmap-olarak-cekme/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>C# la txt dosyasından yada web sayfasından eposta yakalama/ayıklama</title>
		<link>http://www.tiravoglu.com/index.php/c-la-txt-dosyasindan-yada-web-sayfasindan-eposta-yakalamaayiklama/</link>
		<comments>http://www.tiravoglu.com/index.php/c-la-txt-dosyasindan-yada-web-sayfasindan-eposta-yakalamaayiklama/#comments</comments>
		<pubDate>Tue, 21 Jun 2011 01:41:37 +0000</pubDate>
		<dc:creator>blogadmin</dc:creator>
				<category><![CDATA[c#]]></category>
		<category><![CDATA[eposta]]></category>
		<category><![CDATA[eposta ayıklama]]></category>
		<category><![CDATA[eposta bulma]]></category>
		<category><![CDATA[eposta yakalama]]></category>
		<category><![CDATA[la serisi]]></category>
		<category><![CDATA[txt dosyasından eposta ayıklama]]></category>
		<category><![CDATA[web sayfasında eposta bulma]]></category>

		<guid isPermaLink="false">http://www.tiravoglu.com/?p=54</guid>
		<description><![CDATA[<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><div style="display:inline;float:right;margin-left:1em"><script type="IN/Share" data-url="http://www.tiravoglu.com/index.php/c-la-txt-dosyasindan-yada-web-sayfasindan-eposta-yakalamaayiklama/" data-counter="right"></script></div><div style="display:inline;float:right;margin-left:1em"><g:plusone href="http://www.tiravoglu.com/index.php/c-la-txt-dosyasindan-yada-web-sayfasindan-eposta-yakalamaayiklama/"></g:plusone></div>
Verilen dosya içindeki epostaları yakalayıp başka bir txt dosyasına yazan kodlar string okunacak_txt=@"c:\oku.txt"; string yazilacak_txt = @"c:\yaz.txt"; string data = File.ReadAllText(okunacak_txt); Regex emailRegex = new Regex(@"\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*", RegexOptions.IgnoreCase); MatchCollection emailMatches = emailRegex.Matches(data); StringBuilder sb = new StringBuilder(); foreach (Match emailMatch in emailMatches) { sb.AppendLine(emailMatch.Value + Environment.NewLine); } File.WriteAllText(yazilacak_txt, sb.ToString()); Aynı şekilde istenirse txt dosyadan okumak yerine [...]]]></description>
			<content:encoded><![CDATA[<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><div style="display:inline;float:right;margin-left:1em"><script type="IN/Share" data-url="http://www.tiravoglu.com/index.php/c-la-txt-dosyasindan-yada-web-sayfasindan-eposta-yakalamaayiklama/" data-counter="right"></script></div><div style="display:inline;float:right;margin-left:1em"><g:plusone href="http://www.tiravoglu.com/index.php/c-la-txt-dosyasindan-yada-web-sayfasindan-eposta-yakalamaayiklama/"></g:plusone></div>
<p>Verilen dosya içindeki epostaları yakalayıp başka bir txt dosyasına yazan kodlar</p>
<pre class="brush: csharp; gutter: true; first-line: 1">            string okunacak_txt=@"c:\oku.txt";
            string yazilacak_txt = @"c:\yaz.txt";
            string data = File.ReadAllText(okunacak_txt);
            Regex emailRegex = new Regex(@"\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*", RegexOptions.IgnoreCase);
            MatchCollection emailMatches = emailRegex.Matches(data);
            StringBuilder sb = new StringBuilder();
            foreach (Match emailMatch in emailMatches)
            {
                sb.AppendLine(emailMatch.Value + Environment.NewLine);
            }
            File.WriteAllText(yazilacak_txt, sb.ToString());</pre>
<p>Aynı şekilde istenirse txt dosyadan okumak yerine websitesi içerisinden okuma yapılabilir.</p>
<pre></pre>
<pre class="brush: csharp; gutter: true; first-line: 1">        WebClient w = new WebClient();
        w.Encoding = System.Text.Encoding.UTF8;
        string s = w.DownloadString("http://www.tiravoglu.com");
        string yazilacak_txt = @"c:\yaz.txt";
        string data = s;
        Regex emailRegex = new Regex(@"\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*", RegexOptions.IgnoreCase);
        MatchCollection emailMatches = emailRegex.Matches(data);
        StringBuilder sb = new StringBuilder();
        foreach (Match emailMatch in emailMatches)
        {
            sb.AppendLine(emailMatch.Value + Environment.NewLine);
        }
        File.WriteAllText(yazilacak_txt, sb.ToString());</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.tiravoglu.com/index.php/c-la-txt-dosyasindan-yada-web-sayfasindan-eposta-yakalamaayiklama/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

