Its EuropeWho – Teams, Skype for Business, and other things.

object orientated programming (OOP)

Well… yes. This might take longer than I have really. And you don’t really want to read a ten volume encyclopedia?

What is it? I thought I knew. In the halcion days of my development career, I used this programming model, without even knowing it.

Ok, well it’s a way of organising and designing software around data (objects), as opposed to just creating the functions and the procedures to do the work.

It does involve creating classes, objects, attributes, and methods. These we can see as sort of building blocks of OOP.

BUT the focus of this “brain fart”, is to state the main principles around OOP.

it’s hard getting back on the horse

Yeah, that’s the coding horse of course.

I’ve only spent 4 or 5 months out of real coding, and I’ve forgotten most of it. Well to quantify that, most of the plumbing when using .NET.

Well ok, for example, I have a project that uses ASP.NET MVC and ER to create a website, that takes data presented to it and then forwards that information to Teams to present in an adaptive card.

My day job is supporting adaptive cards (and Teams); the issue is that we only support up to where the other person starts to write their own code. So I have a bit of a gap when it comes to using .NET (C# flavour) to build all the scaffolding to create the JSON to build an adaptive card.

I did code all of this lovely MVC c# stuff before, but since I am not that good at anything mental (explanation later) it sometimes takes time to get back into the grove.

I’ll keep updating this blog with specific things I had to do AND will try to remember by posting here 😁

virtual & override methods

So, I am looking at classes with different behaviours.

And just trying to get back “on the bike” with the various keywords in the Visual C#.NET editor.

Creating a new class and adding a procedure to it….

The master class (HAR HAR) has the function indicated with the virtual keyword. Indicating it could be “taken over” or “highjacked” by a child class that inherits the master class.

This is the master class.

public class MasterVehicle
{
private string _nameOfMasterVehicle = string.Empty;
/// <summary>
/// NameOfVehicle
/// Will set the name of the vehicle.  Will only set it if the variable passed in has one or more characters
/// </summary>
/// <param name="TheName"></param>
public virtual void NameOfVehicle(string TheName)
{
if(TheName.Count()>0)
{
// ok there is more than one character in the passed in string
_nameOfMasterVehicle = TheName;
}
}
}

Ok thats the master class…. It has the virtual keyword.

That doesn’t mean that any class that inherits it, needs to take that virtual procedure. OH NO.

But if I want to I can do this:

public class Car : MasterVehicle
{
/// <summary>
/// This is the overriden method that was written in the MasterVehicle class
/// </summary>
/// <param name="TheName"></param>
public override void NameOfVehicle(string TheName)
{
base.NameOfVehicle(TheName);
}
}

There you can see I inherited the master vehicle class in the first declaration of the child class and then put a proc in that uses the override keyword to errrr override the method called “NameOfVehicle”.

Just Say Hello

Yep just say Hello!

I’m not against people just pinging me on Teams / Skype for Business / Skype or any other messaging engine, just to say Hi!

And HELLO back!

Welcome

This is my blog! Simple eh?

Well not really, I’m dealing with these subjects, (a load of them)…

  • Microsoft Teams Client.
  • Development in .NET.
  • Empathy.
  • Negotiation.
  • Investing in peers.

So that’s an eclectic mix eh?
Most of them will be short and sweet, I’ll make sure I update each of the subjects as soon as I can.
Please do comment and please have a look around.