ref class and ref struct are the same thing. You could replace class with struct below, but no-one uses struct.

Define a structure

	public ref class DOCINFO
	{
	public:
		String ^DocumentName;
		String ^OutputFile;
		int ^TheValue;
	};
If You Need A Constructor

		//----- CONSTRUCTOR -----
		public: DOCINFO::DOCINFO()
		{
			DocumentName = "";
			OutputFile = "";
		}
Use it in functions

	void MyFunction (DOCINFO ^info)
	{
		info->DocumentName = "Hello";
		int->TheValue = 10;

or


	void MyFunction (DOCINFO info)
	{
		info.DocumentName = "Hello";
		int.TheValue = 10;
Define it in functions

	DOCINFO ^info;

	info->DocumentName = "Hello";
	int->TheValue = 10;

or


	DOCINFO info;

	info.DocumentName = "Hello";
	int.TheValue = 10;
Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.

Comments

Your email address will not be published.