Click here to Skip to main content
15,884,473 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: static_cast vs cli::safe_cast Pin
ian__lindsay16-Feb-11 22:02
ian__lindsay16-Feb-11 22:02 
QuestionPreselecting files in a CFileDialog Pin
Hayden Fisher14-Feb-11 21:31
Hayden Fisher14-Feb-11 21:31 
QuestionSpliting a String in C++/CLI Pin
T.RATHA KRISHNAN14-Feb-11 20:03
T.RATHA KRISHNAN14-Feb-11 20:03 
AnswerRe: Spliting a String in C++/CLI Pin
Ger Hayden14-Feb-11 21:59
Ger Hayden14-Feb-11 21:59 
GeneralRe: Spliting a String in C++/CLI Pin
T.RATHA KRISHNAN14-Feb-11 22:13
T.RATHA KRISHNAN14-Feb-11 22:13 
GeneralRe: Spliting a String in C++/CLI Pin
Ger Hayden15-Feb-11 6:01
Ger Hayden15-Feb-11 6:01 
GeneralRe: Spliting a String in C++/CLI Pin
Richard MacCutchan15-Feb-11 23:24
mveRichard MacCutchan15-Feb-11 23:24 
AnswerRe: Spliting a String in C++/CLI Pin
John Schroedl15-Feb-11 10:16
professionalJohn Schroedl15-Feb-11 10:16 
This seems to work:

#include "stdafx.h"

using namespace System;

int main(array<String ^> ^args)
{
	array<String^>^ lines = System::IO::File::ReadAllLines("C:\\temp\\test.ini", System::Text::Encoding::UTF8);

	Console::WriteLine("Key\t\tValue");

	for each (String^ line in lines)
	{
		if (String::IsNullOrWhiteSpace(line))
			continue;

		int offset = line->LastIndexOf("=");
		if (offset >= 0) 
		{
			String^ key = line->Substring(0, offset)->Trim();
			String^ value = line->Substring(offset+1)->Trim();

			Console::WriteLine(key + "\t\t" + value);
		}
	}

	return 0;
}


John
QuestionBadImageFormat exception because of just class definition. Pin
progDes10-Feb-11 1:44
progDes10-Feb-11 1:44 
AnswerRe: BadImageFormat exception because of just class definition. Pin
progDes10-Feb-11 17:09
progDes10-Feb-11 17:09 
QuestionAdding Member Functions to the .CPP Pin
Ger Hayden10-Feb-11 0:30
Ger Hayden10-Feb-11 0:30 
QuestionAdding a member function in VC++ Express 2010 Pin
Ger Hayden10-Feb-11 0:27
Ger Hayden10-Feb-11 0:27 
QuestionInline processor assembly language in C++/CLI Pin
anti.AS7-Feb-11 21:54
anti.AS7-Feb-11 21:54 
AnswerRe: Inline processor assembly language in C++/CLI Pin
John Schroedl8-Feb-11 5:42
professionalJohn Schroedl8-Feb-11 5:42 
QuestionDifference between IJW and #pragma unmanaged ? Pin
anti.AS7-Feb-11 5:10
anti.AS7-Feb-11 5:10 
AnswerRe: Difference between IJW and #pragma unmanaged ? Pin
Nish Nishant7-Feb-11 5:24
sitebuilderNish Nishant7-Feb-11 5:24 
GeneralRe: Difference between IJW and #pragma unmanaged ? Pin
anti.AS7-Feb-11 9:08
anti.AS7-Feb-11 9:08 
GeneralRe: Difference between IJW and #pragma unmanaged ? Pin
Nish Nishant7-Feb-11 9:16
sitebuilderNish Nishant7-Feb-11 9:16 
GeneralRe: Difference between IJW and #pragma unmanaged ? Pin
anti.AS7-Feb-11 9:36
anti.AS7-Feb-11 9:36 
QuestionWhat is Difference between Managed C++, C++/CLI and C++.Net Pin
Pranit Kothari5-Feb-11 4:26
Pranit Kothari5-Feb-11 4:26 
AnswerRe: What is Difference between Managed C++, C++/CLI and C++.Net Pin
Richard MacCutchan5-Feb-11 5:28
mveRichard MacCutchan5-Feb-11 5:28 
QuestionRe: What is Difference between Managed C++, C++/CLI and C++.Net Pin
Pranit Kothari5-Feb-11 5:59
Pranit Kothari5-Feb-11 5:59 
AnswerRe: What is Difference between Managed C++, C++/CLI and C++.Net Pin
Richard MacCutchan5-Feb-11 21:16
mveRichard MacCutchan5-Feb-11 21:16 
GeneralRe: What is Difference between Managed C++, C++/CLI and C++.Net Pin
Pranit Kothari6-Feb-11 3:20
Pranit Kothari6-Feb-11 3:20 
AnswerRe: What is Difference between Managed C++, C++/CLI and C++.Net Pin
John Schroedl5-Feb-11 8:02
professionalJohn Schroedl5-Feb-11 8:02 

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.