zoukankan      html  css  js  c++  java
  • mono和monodevelop在Ubuntu10.04上新安装方法

    今天发现了一个较简单的方法来安装mono和monodevelop在linux上进行.NET开发。再次感受到mono强大的魅力

    那就是通过badgerports来安装,网址:http://babdgerports.org,一个专门负责ubuntu上mono软件包安装的团队做的

    badgerports is an Ubuntu repository. In order to use it, you must add it to your Software Sources.

    1. Click on "System", "Administration", "Software Sources".

    2. Click on the "Other Software" tab.

    3. Click on "Add...", and enter the line:

      deb http://badgerports.org lucid main

      Screenshot from Software Sources

    4. Click on "Add Source"

    5. Click on "Authentication", then on "Import Key File"

    6. Download this GPG key file, ID 0E1FAD0C, and select it in the "Import Key File" window

    7. Click on "Close", then "Reload" when the pop-up appears. You're all set!

    From now on, whenever you try to install or update Mono-related packages on your system, you will be given the badgerports version for preference. You don't need to do anything more than update your system as usual to get started!

    第一个mono程序,注意编码的问题

    using System;
    using System.IO;
    using System.Text;

    namespace tetsmono
    {
    class MainClass
    {
    public static void Main (string[] args)
    {
    //创建一个文件流
    //FileStream fs=new FileStream("/home/guoyuanwei/test",FileMode.Open,FileAccess.ReadWrite);
    //创建一个文本写对象 ,包装文件流
    //StreamWriter sw=new StreamWriter(fs,Encoding.Default);
    StreamWriter sw=new StreamWriter("/home/guoyuanwei/test",true,Encoding.Default);
    try
    {
    //写入文本,默认加一个换行
    sw.WriteLine("中华人民共和国");
    }
    catch(Exception ex)
    {
    Console.WriteLine(ex.Message);
    }
    finally
    {
    sw.Close();
    //fs.Close();
    }
    }

    public static void AddText(FileStream fs,string values)
    {
    byte[] info=new UTF8Encoding(true).GetBytes(values);
    fs.Write(info,0,info.Length);
    }

    }
    }



  • 相关阅读:
    jpa项目倒入eclipse中,无法识别注解的实体类
    上传文件的js控件,无刷新
    Maven 安装
    location 浅解析
    小程序 上传图片(多张、多次上传),预览图片 删除图片
    小程序 跳转问题 (来源见注明)
    GIT 安装和升级
    span 不使用float 靠右对齐且垂直居中
    PHP 根据php传的值修改 select 中动态生成的 option 组的默认选中值
    MAC 隐藏功能
  • 原文地址:https://www.cnblogs.com/guoyuanwei/p/2432013.html
Copyright © 2011-2022 走看看