Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Return in IF statement and Function Powershell What is C# equivalent?

$
0
0

Function updatedataset {
 param ($ds)
 
 $ds = $dataset
 $da = New-Object system.data.sqlclient.sqldataadapter $ds.ExtendedProperties["sql"], $ds.ExtendedProperties["connectionstring"]
 $cb = new-object system.data.sqlclient.sqlcommandbuilder $da
 $da.UpdateCommand = $cb.GetUpdateCommand()
 $da.InsertCommand = $cb.GetInsertCommand()
 $da.DeleteCommand = $cb.GetDeleteCommand()
 $null = $da.Update($ds)
 return
}

if (-not($true))
  {
  updatedataset $ds

  return
  }

What does return mean in if statement and the updatedataset function? and what is its equivalent in c# is using return needed when we convert the above code in c#?


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>