Wednesday, 21 August 2013

c# multi line strings allowing variable calling

c# multi line strings allowing variable calling

I have googled but cannot find an answer for this question:
I know about multi-line strings in c#. But how can I create a string like:
string temp = @"DECLARE @rolename varchar(max)
SET @rolename ='***'
EXEC sp_addrolemember N'db_execute',@rolename"
* represents there I have to delcare a variable having some value like
(object.variable).
Is this possible??

No comments:

Post a Comment