运行此代码时,我无法获得所需的输出 [英] i am not getting the desired output while running this code

查看:78
本文介绍了运行此代码时,我无法获得所需的输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using VDS.RDF;
using VDS.RDF.Writing;


namespace dotnetrdf2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        
        private void Form1_Load(object sender, EventArgs e)
        {
            Graph g = new Graph();

            IUriNode dotNetRDF = g.CreateUriNode(UriFactory.Create("http://www.dotnetrdf.org"));
            IUriNode says = g.CreateUriNode(UriFactory.Create("http://example.org/says"));
            ILiteralNode helloWorld = g.CreateLiteralNode("Hello World");
            ILiteralNode bonjourMonde = g.CreateLiteralNode("Bonjour tout le Monde", "fr");

            g.Assert(new Triple(dotNetRDF, says, helloWorld));
            g.Assert(new Triple(dotNetRDF, says, bonjourMonde));

            foreach (Triple t in g.Triples)
            {
                Console.WriteLine(t.ToString());
            }

            NTriplesWriter ntwriter = new NTriplesWriter();
            ntwriter.Save(g, "HelloWorld.nt");

            RdfXmlWriter rdfxmlwriter = new RdfXmlWriter();
            rdfxmlwriter.Save(g, "HelloWorld.rdf");

            Console.ReadLine();
        }
    }
}





它没有显示任何输出.. jst加载表格。请告诉我这个问题。



its not showing any output ..its jst loading the form. plz tell me wats the problem.

推荐答案

嗯......这可能是一个问题...

Well...this might be a problem...
Console.ReadLine();

这将使您的WinForms应用程序在Load事件结束时停止并等待您在控制台中键入一些您没有的数据...



拿出来!

Which is going to make your WinForms app stop at the end of the Load event and wait for you to type some data in the console you haven't got...

Take it out!


这篇关于运行此代码时,我无法获得所需的输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆