コード例 #1
0
ファイル: gtest-friend-07.cs プロジェクト: nobled/mono
	public static void Main ()
	{
		FriendClass fc = new FriendClass ();
		
		// We should be able to access them
		FriendClass.StaticFriendMethod ();
		fc.InstanceFriendMethod ();
	}
コード例 #2
0
	static void Main ()
	{
		FriendClass fc = new FriendClass ();
		
		// We should be able to access them
		int a = FriendClass.StaticFriendProperty;
		int b = fc.InstanceFriendProperty;
	}
コード例 #3
0
ファイル: gtest-friend-05.cs プロジェクト: nobled/mono
	public static void Main ()
	{
		FriendClass fc = new FriendClass ();
		
		// We should be able to access it
		FriendClass.StaticFriendField = 5;
		fc.InstanceFriendField = 6;
	}
コード例 #4
0
ファイル: gtest-friend-07.cs プロジェクト: pmq20/mono_forked
    public static void Main()
    {
        FriendClass fc = new FriendClass();

        // We should be able to access them
        FriendClass.StaticFriendMethod();
        fc.InstanceFriendMethod();
    }
コード例 #5
0
    static void Main()
    {
        FriendClass fc = new FriendClass();

        // We should be able to access it
        FriendClass.StaticFriendField = 5;
        fc.InstanceFriendField        = 6;
    }
コード例 #6
0
    static void Main()
    {
        FriendClass fc = new FriendClass();

        // We should be able to access them
        int a = FriendClass.StaticFriendProperty;
        int b = fc.InstanceFriendProperty;
    }
コード例 #7
0
    void writeFriend(FriendClass f)
    {
        string source = "Server=" + serverIP + "; Port=" + port + "; Database=" + database + "; Uid=" + Uid + "; Password="******";";
        MySqlConnection _connect = new MySqlConnection(source);
        _connect.Open();

        string _fill = "', '";
        string values = "('" + f.getname() + _fill + f.getf1() + _fill + f.getf2() + _fill + f.getf3() + _fill + f.getf4() + _fill + f.getf5() + "')";
        string locations = "(Name, FriendOne, FriendTwo, FriendThree, FriendFour, FriendFive)";
        string cmdText = "INSERT INTO frienddata " + locations + " VALUES" + values;

        MySqlCommand _cmd = _connect.CreateCommand();
        _cmd.CommandText = cmdText;
        _cmd.ExecuteNonQuery();

        _connect.Close();
    }
コード例 #8
0
    /*
     * public bool CheckForEnergizer()
     * {
     *  foreach (FriendClass friend in friendList)
     *  {
     *      if (friend.GetComponent<FriendClassBunny>() != null)
     *      {
     *          if (friend.GetComponent<FriendClassBunny>().freeWildLifeEnergy)
     *          {
     *              return true;
     *          }
     *          else
     *          {
     *              return false;
     *          }
     *
     *      }
     *      else
     *      {
     *          return false;
     *      }
     *  }
     *  return false;
     * }
     */

    public bool CheckForFriend(FriendClass friend)
    {
        foreach (FriendClass myFriend in friendList)
        {
            if (friend.friendID == myFriend.friendID)
            {
                if (friend.ReturnFriendStatus())
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                return(false);
            }
        }
        return(false);
    }
コード例 #9
0
 static void Main()
 {
     FriendClass.MyMethod();
 }
コード例 #10
0
 // the friend class would be able to call myMethod
 public void MyMethod(FriendClass F, double x, int i)
 {
     this.MyMethod(x, i);
 }