Skip to content

Instantly share code, notes, and snippets.

@zivanovicb
Created June 15, 2017 19:50
Show Gist options
  • Save zivanovicb/3e513cce8796c9ffb6a302ea8ca1c392 to your computer and use it in GitHub Desktop.
Save zivanovicb/3e513cce8796c9ffb6a302ea8ca1c392 to your computer and use it in GitHub Desktop.
Klasa sa interfejsom
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApplication21
{
public partial class Form1 : Form, Interfejs
{
// I sad zato sto si implementirao interfejs ovde moras da implementiras te metode. Ovo ce te pitati
// Sve metode MORAJU da budu public!
public double povrsina()
{
return 2.6; // Metode moraju da vracaju vrednost koja je navedena u interfejsu(U ovom slucaju double)
}
public void ispis()
{
MessageBox.Show("Ispis neki");
}
public string stringcina()
{
return "Ovo je neki string";
}
public Form1()
{
InitializeComponent();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment