Click here to Skip to main content
15,899,754 members
Home / Discussions / C#
   

C#

 
GeneralRe: Searching for an open socket on a local network Pin
Jordanwb15-Apr-08 14:16
Jordanwb15-Apr-08 14:16 
GeneralRe: Searching for an open socket on a local network Pin
Luc Pattyn15-Apr-08 14:24
sitebuilderLuc Pattyn15-Apr-08 14:24 
GeneralRe: Searching for an open socket on a local network [modified] Pin
Jordanwb15-Apr-08 14:29
Jordanwb15-Apr-08 14:29 
GeneralProblem with publishing an application Pin
EladKatz15-Apr-08 12:00
EladKatz15-Apr-08 12:00 
GeneralRe: Problem with publishing an application Pin
Judah Gabriel Himango15-Apr-08 12:21
sponsorJudah Gabriel Himango15-Apr-08 12:21 
QuestionRe: Problem with publishing an application Pin
EladKatz15-Apr-08 19:56
EladKatz15-Apr-08 19:56 
AnswerRe: Problem with publishing an application Pin
Judah Gabriel Himango16-Apr-08 4:10
sponsorJudah Gabriel Himango16-Apr-08 4:10 
Generalcommon_documents folder Pin
Glen Harvy15-Apr-08 11:58
Glen Harvy15-Apr-08 11:58 
GeneralRe: common_documents folder Pin
Judah Gabriel Himango15-Apr-08 12:17
sponsorJudah Gabriel Himango15-Apr-08 12:17 
GeneralRe: common_documents folder Pin
Glen Harvy15-Apr-08 13:39
Glen Harvy15-Apr-08 13:39 
GeneralRe: common_documents folder Pin
Judah Gabriel Himango16-Apr-08 4:38
sponsorJudah Gabriel Himango16-Apr-08 4:38 
GeneralRe: common_documents folder Pin
Scott Dorman19-Apr-08 8:40
professionalScott Dorman19-Apr-08 8:40 
GeneralExtracting An IE shortcut's icon Pin
sagedread15-Apr-08 10:41
sagedread15-Apr-08 10:41 
GeneralRe: Extracting An IE shortcut's icon Pin
Judah Gabriel Himango15-Apr-08 11:50
sponsorJudah Gabriel Himango15-Apr-08 11:50 
GeneralRe: Extracting An IE shortcut's icon Pin
sagedread15-Apr-08 14:54
sagedread15-Apr-08 14:54 
GeneralRe: Extracting An IE shortcut's icon Pin
Judah Gabriel Himango16-Apr-08 4:30
sponsorJudah Gabriel Himango16-Apr-08 4:30 
sagedread wrote:
how would you search for the string representing the favicon.ico path?

In .NET 1 and .NET 2, you'd write it like this:
string iconFilePath = "";
string iconFileLabel = "IconFile="; 
foreach (string line in File.ReadAllLines(theFavoriteFilePathGoesHere))
{
     if (line.StartsWith(iconFileLabel))
     {
         iconFilePath = line.Remove(0, iconFileLabel.Length);
         break;
     }
}
Or if you're using the latest version of .NET, you could write this as a LINQ query:
var matchingLines = from line in File.ReadAllLines(favoriteFilePath)
                    let iconFileLabel = "IconFile="
                    where line.StartsWith(iconFileLabel)
                    select line.Remove(0, iconFileLabel.Length);

var iconFilePath = matchingLines.FirstOrDefault();






Tech, life, family, faith: Give me a visit.
I'm currently blogging about: I'm Offended That You're Offended!
The apostle Paul, modernly speaking: Epistles of Paul

Judah Himango


QuestionHow to pass object array to unmanaged C++ Pin
Alan Balkany15-Apr-08 10:13
Alan Balkany15-Apr-08 10:13 
AnswerRe: How to pass object array to unmanaged C++ Pin
Alan Balkany15-Apr-08 11:10
Alan Balkany15-Apr-08 11:10 
GeneralRe: How to pass object array to unmanaged C++ Pin
Luc Pattyn15-Apr-08 13:29
sitebuilderLuc Pattyn15-Apr-08 13:29 
GeneralRe: How to pass object array to unmanaged C++ Pin
Alan Balkany16-Apr-08 3:49
Alan Balkany16-Apr-08 3:49 
Generalrdlc repoting - center image in picturebox Pin
AJ du Plessis15-Apr-08 8:38
AJ du Plessis15-Apr-08 8:38 
GeneralRe: rdlc repoting - center image in picturebox Pin
Alan N15-Apr-08 8:50
Alan N15-Apr-08 8:50 
GeneralRe: rdlc repoting - center image in picturebox Pin
AJ du Plessis15-Apr-08 9:01
AJ du Plessis15-Apr-08 9:01 
GeneralKeyboard hooks and sendinput.. Pin
Bakaneko15-Apr-08 6:26
Bakaneko15-Apr-08 6:26 
GeneralRe: Keyboard hooks and sendinput.. Pin
Anthony Mushrow15-Apr-08 7:00
professionalAnthony Mushrow15-Apr-08 7:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.