本文介绍了有代码转换器吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个来自朋友的代码。它看起来像C Sharp,但有些部分看起来像VB。有人可以为我清除这个吗?



I have this code that I got from a friend. It looks like C Sharp but some parts look like VB. Can someone clear this up for me?

@{
    var db = Database.Open("website");

    var selectQueryString = "SELECT * FROM webpages_UserProfile WHERE UserId = @0";

    var row = db.QuerySingle(selectQueryString, WebSecurity.CurrentUserId);
    var name = row.Name;
    var lastname = row.Lastname;
    
    if (IsPost) {
        
        name = Request.Form["Name"];
        lastname = Request.Form["LastName"];
        var update = @"UPDATE webpages_UserProfile SET Name = @0, Lastname = @1 WHERE UserId = @2";
        db.Execute(update, name, lastname, WebSecurity.CurrentUserId);
        Response.Redirect("/");
    }
}

推荐答案



这篇关于有代码转换器吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 03:42