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

Managed C++/CLI

 
AnswerRe: Why Multiple projects Pin
jschell4-Feb-11 9:48
jschell4-Feb-11 9:48 
GeneralRe: Why Multiple projects Pin
Pranit Kothari5-Feb-11 4:22
Pranit Kothari5-Feb-11 4:22 
GeneralRe: Why Multiple projects Pin
jschell5-Feb-11 7:00
jschell5-Feb-11 7:00 
GeneralRe: Why Multiple projects Pin
Pranit Kothari5-Feb-11 17:42
Pranit Kothari5-Feb-11 17:42 
QuestionRequired msvcrt.pdb 7.0.2600.5512 Pin
ptr_Electron4-Feb-11 2:47
ptr_Electron4-Feb-11 2:47 
AnswerRe: Required msvcrt.pdb 7.0.2600.5512 Pin
John Schroedl4-Feb-11 5:19
professionalJohn Schroedl4-Feb-11 5:19 
AnswerRe: Required msvcrt.pdb 7.0.2600.5512 Pin
Hans Dietrich4-Feb-11 9:30
mentorHans Dietrich4-Feb-11 9:30 
QuestionCLI and Visual Studio 2008: IntelliSense Does not work Pin
Joschwenk6663-Feb-11 5:07
Joschwenk6663-Feb-11 5:07 
AnswerRe: CLI and Visual Studio 2008: IntelliSense Does not work Pin
John Schroedl3-Feb-11 8:45
professionalJohn Schroedl3-Feb-11 8:45 
QuestionHow to cancel console application? Pin
piul31-Jan-11 5:41
piul31-Jan-11 5:41 
AnswerRe: How to cancel console application? Pin
Luc Pattyn31-Jan-11 6:00
sitebuilderLuc Pattyn31-Jan-11 6:00 
GeneralRe: How to cancel console application? Pin
piul31-Jan-11 21:11
piul31-Jan-11 21:11 
AnswerRe: How to cancel console application? Pin
Luc Pattyn1-Feb-11 3:04
sitebuilderLuc Pattyn1-Feb-11 3:04 
QuestionCString question Pin
ptr_Electron27-Jan-11 18:07
ptr_Electron27-Jan-11 18:07 
AnswerRe: CString question Pin
Richard MacCutchan27-Jan-11 23:04
mveRichard MacCutchan27-Jan-11 23:04 
AnswerRe: CString question Pin
jschell28-Jan-11 8:58
jschell28-Jan-11 8:58 
QuestionI am working on Windbg to analyse [modified] Pin
ptr_Electron24-Jan-11 23:32
ptr_Electron24-Jan-11 23:32 
AnswerRe: I am working on Windbg to analyse Pin
Richard MacCutchan25-Jan-11 3:05
mveRichard MacCutchan25-Jan-11 3:05 
QuestionHow to display an image on a activex webpage Pin
simon alec smith23-Jan-11 1:42
simon alec smith23-Jan-11 1:42 
AnswerRe: How to display an image on a activex webpage Pin
N a v a n e e t h24-Jan-11 6:09
N a v a n e e t h24-Jan-11 6:09 
QuestionGPS Support Pin
Ger Hayden13-Jan-11 22:10
Ger Hayden13-Jan-11 22:10 
AnswerRe: GPS Support Pin
jschell14-Jan-11 10:15
jschell14-Jan-11 10:15 
QuestionShow form minimized. Pin
TheBerk13-Jan-11 9:17
TheBerk13-Jan-11 9:17 
AnswerRe: Show form minimized. Pin
Richard MacCutchan13-Jan-11 10:41
mveRichard MacCutchan13-Jan-11 10:41 
QuestionGeneric Cyclic List Default Property [modified] Pin
Jason Titcomb6-Jan-11 0:59
Jason Titcomb6-Jan-11 0:59 
I cannot get the syntax for the cyclic list class I am working on.
In the following class you see that I have a property named CycItem.
This works, but I would like to have it be the default indexer so I can just use Item or [].
Any help would be great.
#pragma once
using namespace System;
using namespace System::Collections::Generic;
using namespace System::Reflection;
namespace MG_Geo {
	generic <typename T>
	public ref class CycList: public List<T>
	{
		// Methods
	public:
		CycList()
		{
		}
		//property
		property T CycItem [int] 
		{
			T get(int index) {
				if (this->Count==0)
				{
					throw gcnew IndexOutOfRangeException("IndexOutOfRange Count = 0");
				}

				while (index < 0)
				{
					index = (this->Count + index);
				}
				if (index >= this->Count)
				{
					index = (index % this->Count);
				}
				return this[index];
			}

			void set(int index, T value) {
				if (this->Count==0)
				{
					throw gcnew IndexOutOfRangeException("IndexOutOfRange Count = 0");
				}

				while (index < 0)
				{
					index = (this->Count + index);
				}
				if (index >= this->Count)
				{
					index = (index % this->Count);
				}
				this[index] = *value;
			}    
		}
	};
}


modified on Friday, January 7, 2011 6:22 AM

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.