How to Handle a Long Description Line For Interface Function

I got a long description for my interface function.

IMyInterface.cs

[Description("Line 1 description content here! Line 2 description content here!Line 3 description content here!Line 4 description content here!Line 5 description content here!Line 6 description content here!")] void foo() { }

How to convert the single line to multi lines style. thanks.

[Description("Line 1 description content here! Line 2 description content here!Line 3 description content here! Line 4 description content here!Line 5 description content here! Line 6 description content here!")] void foo() { }

-------------Problems Reply------------

You want to use a verbatim string, just preppend @ to your string:

[Description(@"Line 1 description content here!
Line 2 description content here!
Line 3 description content here!
Line 4 description content here!
Line 5 description content here!
Line 6 description content here!")]
void foo()
{
}

Note that the indentations starting on line 2 will be part of your string in this case.

Category:c# Views:0 Time:2010-02-04
Tags: c# function

Related post

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.118 (s). 11 q(s)