why would the sql command be any different if executed as a command from C# ?
the following should work:
using (var command1 = connection.CreateCommand())
{
command1.CommandText = "IF EXISTS(select * from INFORMATION_SCHEMA.VIEWS where TABLE_SCHEMA = 'dbo' and TABLE_NAME = 'ViewName') DROP VIEW dbo.ViewName";
//todo: execute command, etc...
}