2 Replies - 212 Views - Last Post: 19 November 2012 - 11:59 AM Rate Topic: -----

#1 JohnFYI  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 19-November 12

C# Classes and Strings?

Posted 19 November 2012 - 11:17 AM

Okay, I have 2 classes. I am trying to get a string from a different class.

So lets say.

I am in Class 2, I am trying to get the string in Class 1. How would I do this?
Is This A Good Question/Topic? 0
  • +

Replies To: C# Classes and Strings?

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8401
  • View blog
  • Posts: 31,266
  • Joined: 12-June 08

Re: C# Classes and Strings?

Posted 19 November 2012 - 11:33 AM

A public variable? A public 'get' property? A public function that returns a string?
Was This Post Helpful? 3
  • +
  • -

#3 tlhIn`toq  Icon User is online

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5316
  • View blog
  • Posts: 11,374
  • Joined: 02-June 10

Re: C# Classes and Strings?

Posted 19 November 2012 - 11:59 AM

Tutorial on properties and classes are linked in my signature block
Was This Post Helpful? 2
  • +
  • -

Page 1 of 1