Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

C# Custom setter with parameter

private string fullName;
public string this[string firstName]
{
    get { return fullName; }
    set { fullName = firstName + " " + value; }
}

// Sample usage...
foo["Jon"] = "Skeet";
string name = foo["Bar"]; // name is now "Jon Skeet"
Comment

PREVIOUS NEXT
Code Example
Csharp :: print the top view of the binary tree 
Csharp :: www.elking.net 
Csharp :: c# access control from another thread 
Csharp :: c# get buttons row and column in grid 
Csharp :: unity button hover 
Csharp :: xml reader attributes 
Csharp :: unity AppDomain 
Csharp :: unity I run exe second monitor 
Csharp :: ascx access parent master page 
Csharp :: unity enable hdr picker 
Csharp :: How to convert output of HttpClient PostAsJsonAsync() into user defined list of object 
Csharp :: unity remove all child 
Csharp :: unity set terrain to image 
Csharp :: Connect To MongoDB From A Different Machine 
Csharp :: attribute decorator to require email format of string c# 
Csharp :: select vs where linq 
Csharp :: c# if a new program is started 
Csharp :: DotNet web Api Token based Authentication 
Csharp :: Convert any class to a keyvaluepair 
Csharp :: How to make a capsule walk in unity 
Csharp :: c# run foreach loop x times 
Csharp :: .net core string compare ignore case and accents 
Csharp :: how to colapse all methods visual studio 
Csharp :: C# if...else if Statement 
Csharp :: unity make particles stay still 
Csharp :: go to the corresponding brace visual studio C# 
Csharp :: static {} 
Csharp :: C# Project File Create 
Csharp :: new bitmap pixel format c# 
Csharp :: get position of gameobject unity 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =