Use:
public string myvoid(string key, bool data)
{
return key + " = " + data;
}
Also, your method shouldn’t be called myvoid
any more since it actually returns a value. Something like FormatValue
would be better.
More Related Contents:
- Iterating through a List and .Contains isn’t catching string [closed]
- .NET String.Format() to add commas in thousands place for a number
- Identify if a string is a number
- Easiest way to split a string on newlines in .NET?
- Are string.Equals() and == operator really same? [duplicate]
- How can I strip HTML tags from a string in ASP.NET?
- Convert a list to a string in C#
- Most efficient way to remove special characters from string
- Serialize an object to string
- What does $ mean before a string?
- Find text in string with C#
- Is there a C# case insensitive equals operator?
- Multiple string comparison with C#
- How to remove all white space from the beginning or end of a string?
- String concatenation vs String Builder. Performance
- Find Nth occurrence of a character in a string
- Characters in string changed after downloading HTML from the internet
- Getting hash of a list of strings regardless of order
- Easier way of writing null or empty?
- How can I get a character in a string by index?
- What is the difference between .Equals and == [duplicate]
- sort string-numbers [duplicate]
- Reversible shuffle algorithm using a key
- Is there a “String.Format” that can accept named input parameters instead of index placeholders? [duplicate]
- How do i split a String into multiple values?
- String.Replace ignoring case
- How can I measure the similarity between 2 strings? [closed]
- How to pass strings from C# to C++ (and from C++ to C#) using DLLImport?
- Adding a newline into a string in C#
- How can I create all possible combinations for a set of words without repetition?