使用cs2php将Csharp转换为PHP

时间:2020-06-30 07:48:10

标签: c# php

我试图将Piotr isukces csharp执行到PHP转换器https://github.com/isukces/cs2php 感谢本网站(Creating cs2php compiler using Visual Studio 2017)上的另一篇文章,编译了'cs2php.exe'之后,当我运行命令进行转换时,我得到了:

import React, { useState } from 'react';
import { Row, Col } from 'antd';
import Search from 'antd/lib/input/Search';

const MyPatients = (props: any) => {
    console.log(props);
    const handleSearch = (value: any) => {
        console.log(value);
        setPatientID(value);
    };

    const [patientID, setPatientID] = useState();
    return (
        <>
            <div style={{ marginTop: 90 }}></div>
            <Row gutter={[60, 40]} justify={'center'}>
                <Col span={300}>
                    <p>Søk med personnummer for å finne en pasient.</p>
                    <Search
                        style={{ width: 400 }}
                        placeholder="Søk etter en pasient!"
                        onSearch={handleSearch}
                    />
                </Col>
            </Row>
            {patientID &&
                props.history.push({ pathname: 'Pasient', state: patientID })}
        </>
    );
};
export default MyPatients;

需要一个新创建的PHP文件,但输出文件夹为空(无错误消息)。 我的项目目标配置为.NET Framework 4.5。

1 个答案:

答案 0 :(得分:0)

根据@Magnus Eriksson的评论,我将尝试重写代码并手动进行转换

相关问题