HOME BLOG

How to choose hymns effectively for your church service

Posted on: August 27th, 2026 by Olu No Comments

Hi Folks,

In this article we will discuss a subject that is near and dear to me, titled “How to choose hymns effectively for church service”. But first, you may be wondering: why are hymns so important to church service?

First, hymns help to prepare the minds of the congregation to receive, understand, and appreciate the sermon. Think of it this way… Imagine you have a very important guest at your house, and you want to serve him rice. Do you just give him rice alone? No! Rather, you support the rice with some stew, meat, fish, vegetables, and so on to wash it down and make the rice more enjoyable. So, just as you need to use good stew to support your rice to make the rice more palatable for your guest, that’s how you need to use good hymns to support your sermons to make the sermons palatable to your congregation.

Second, well-chosen hymns serve as useful tools to help preachers convey sound doctrine to the congregation. They sometimes work like proverbs, conveying deep insights in a concise and beautiful way.

Third, hymns help to encourage spiritual growth by singing biblical truths.

And fourth, singing the right hymns creates more unity, friendship, and sense of belonging among believers.

Now we understand why hymns are important to the church service, let’s go into how to choose hymns effectively for church service.

First, you need to carefully study and take into consideration any existing rules used by your church to select hymns. For example, if you attend Celestial Church of Christ (CCC), then usually the first hymn comes from the Forgiveness (Idariji ati Ironupiwada) section of the hymnbook. If you need to deviate from the established pattern, do so with care.

Furthermore, make sure you choose hymns that are relevant to the bible lessons. You need to carefully study the bible lessons. Read them multiple times if necessary. Then identify the keywords and themes of the passages. If a suitable and relevant hymn comes to mind you can consider it, otherwise, search through the hymnbook carefully for hymns that contain the relevant keywords and relate to the theme. You can do this fairly easily with an electronic version of your hymnbook (e.g. YHM provides an electronic version of the CCC hymnbook). These relevant hymns will add more substance and power to the service than hymns that were picked randomly simply because you like them.

Another important strategy is to plan ahead if possible. If you have been given the bible lessons for the next one month, then pick hymns that are relevant for the next 4 – 6 weeks up front. The advantage of doing this is that you get to assign the most relevant hymns to each bible lesson on right dates and there is less chance of assigning the hymns to less suitable dates.

Next, choose hymns that are familiar and easily singable for your choir and congregation. If you plan to introduce new hymns, then first have the choir practice the song during choir practice and make sure they are comfortable with it before selecting it for service. Choose hymns that fit within the singing ability of your choir and one with familiar rhythm. Remember that hymns are designed to carry everyone along, including the choir. How do you know which hymns are familiar to your choir? By taking accurate and consistent records of all hymns selected for church service. So, when you want to choose a hymn, if you aren’t sure whether your choir knows it, then check your hymn number records to see if your choir has sung it in the past. This task can be made very easy if you use an electronic hymn number records. YHM provides one by the way. Also, do not introduce too many new hymns at once into the service.

Next, take into consideration any special seasons your church observes e.g. Easter, Christmas, etc. During these seasons you need to choose hymns that are relevant to them. For example, if you want to choose hymns for Palm Sunday, then pick songs mostly from the Palm Sunday section of the hymnbook as they’re most likely to be relevant to the event. Don’t pick songs from clearly irrelevant sections like Easter for example.

Also, make sure there is good variety in the hymns chosen. Don’t repeat the same hymns too much otherwise it could make the service too predictable and boring. What are some things you can do to make sure you aren’t repeating hymns too much? One approach could be to create a rule that says that you won’t choose a hymn that has been sung within a certain time frame, e.g. one month.  How can you tell the last time a hymn was sung? Simply check your hymn number records. What can you do if you find this kind of search tedious? Easy. Use hymn recommendation software. For example, YHM has a hymn recommendation feature that you can use to easily find suitable hymns that haven’t been sung too recently, and you can configure how much time that should have passed before repeating hymns. Note that this is just meant to be a guide and adjustments can be made if necessary.

That’s all for now. Till next time, happy hymns management.

Improved support for Languages in YHM

Posted on: August 27th, 2026 by Olu No Comments

Hi Folks,

We’re very pleased to announce a new feature on Yinkos Hymns Manager, especially for choirs that sing in multiple languages. YHM now has improved support for languages. How does this work?

Firstly, when you save your hymn MP3s in YHM, you can now specify if the hymn was sung in English or Yoruba and the language will become associated with the hymn and will be easily visible when browsing hymns. This makes it easier for users to find hymns in the correct language, especially if they store hymns in multiple languages.

Also, when you pick hymns numbers for a forthcoming church service on the Hymn Number Records page, you now have the option to specify the language of each hymn, i.e. whether it’s English or Yoruba. On saving the hymn number, the language gets displayed next to the number, making it easy to tell what language to sing the hymn in. But that’s not all. When you specify the language for the hymn number you have picked, YHM automatically connects it with the corresponding hymn MP3 in the specified language if available.

This means let’s say you upload an MP3 for Hymn 5 in English and then you also upload a separate Hymn 5 MP3 in Yoruba using the Hymn MP3 page. Then you later decide you want to sing Hymn 5 in English for your next church service. So, you go to the Hymn Number Records page and choose Hymn 5 and specify English for the language.  As soon as you do this, if you open the Hymn 5 English lyrics and play the audio, it will play your English MP3 recording. Similarly, if you open the Hymn 5 Yoruba lyrics and play the audio, YHM will play your Yoruba MP3. You can do all these with just a few clicks right there on the same page.

Why is this so cool? Because it means it’s now very easy to access and listen to all the audio recordings of the hymns you plan to sing for a future service in the correct language. This makes personal practice easier.

So, what are you waiting for? Visit YHM to try it out. We look forward to your feedback. That’s it for now. Till next time, happy hymns management.

How to keep good records of hymns chosen for church service

Posted on: August 27th, 2026 by Olu No Comments

Hi Folks,

In this article we will explore how to keep good records of hymns chosen for church service. But first, you may be wondering. Why is it important to keep records of hymns selected for church service? Here are few reasons.

Firstly, good hymn recordkeeping helps you know what songs your choir knows how to sing and what songs they very likely do not know. That way, you can more easily pick relevant songs that your choir can sing confidently, and that your congregation can relate to, enjoy, and learn from. It also helps you avoid awkward situations that happen when you accidentally choose hymns that the choir has no clue how to sing.

Secondly, good hymn records help you know how frequently the choir has sung a particular song. That way, you have a decent idea of how well they can sing it. This helps you to be able to assess how much practice the choir will need to get up to speed with a song. For example, if a choir has sung a hymn several times within the last year, chances are that they will easily remember it and will be able to perform it easily and excellently with little practice. But if the choir has only sung the song a few times in the last several years, then most likely they will need more practice to be able to perform it fluently. This insight can help you avoid choosing too many hymns that the choir may not be very fluent in for a single service.

Thirdly, good hymn recordkeeping helps you plan how to introduce new hymns to the choir to expand their knowledge. Let’s assume you come across a new melodious and highly inspirational hymn from your church’s hymnbook, and you start thinking to yourself how amazing it would be if your choir could learn this song to bring some new excitement to the church service. How can you tell with high confidence if the hymn is indeed new to your choir? Simple. Check your hymn records to see if the song has never been picked in the past.

Now that you know why keeping good hymn records is so important, let’s cover the next topic. What details should good hymn records contain? One important detail to write down is the date on which the church service takes place. You can even include the day of the week too, e.g. Sunday, 4/1/2026. Next, if the service falls on a special day in the church calendar, e.g. Christmas Day, Easter Sunday, etc., then it’s good to include that detail. Also, it’s useful to include the positions and hymn numbers. For example, if the first hymn chosen for the service is Hymn 11 and the second hymn is Hymn 378, then you can have a record like 1. 11, 2. 378, etc. Next, it’s handy to take note of the main bible lessons used for the service.

Next, how can you keep good records of hymns chosen for church service? We will cover 3 approaches, starting from the simplest to the most sophisticated and robust.

The simplest way to keep records of hymns chosen is to write them down in a book. An advantage of using a book is that books are cheap. Also, they are easy to use. There are some downsides to using books though. The first disadvantage is that it can be quite tedious to search books for specific hymns. This means it’s hard to do any analysis to gather insights on the kinds of hymns sung. Also, physical books cannot be easily shared. Furthermore, they are quite bulky to store.

As you can see, there are quite a few drawbacks to using books to keep records of hymns. So how do some choirs overcome these issues? This brings us to the next approach to keeping records of hymns, called spreadsheets. What is a spreadsheet? A spreadsheet is a computer software used for organizing, storing, and analysing data in a tabular form. An advantage of using spreadsheets is that they make it easy to keep your hymn records organized. They are also easier to search than books. Furthermore, they’re relatively easy to share. Some downsides of using spreadsheets are that they are quite limited in the kind of information they can display to a user. For example, if you want to see some more details about the hymn written in your spreadsheet, you may have to leave the spreadsheet and find another document e.g. a hymnbook to get those details.

What if you want something richer and more robust than just hymn numbers/titles and dates? For example, what if you want to be able to access more details about the hymns being recorded e.g. the lyrics? This brings us to the third technique you can use to keep records of your hymns, i.e. using a hymn planning software. What do I mean by hymn planning software? This is a computer program designed to allow choirs easily plan what songs to sing during church service and keep records of songs chosen in the past. Some examples of hymn planning software are Hymnnotes, The Hymn Planner, and Yinkos Hymns Manager (YHM). If you attend Celestial Church of Christ (CCC), then YHM is an excellent choice because it provides a robust Hymn Planner that is designed for planning hymns for CCC service. It can help you not only plan your hymns, but also listen to the hymn MP3s, view the lyrics in English and Yoruba, and read the hymn tonic sol-fa. YHM even has a Hymn Recommendations tool that can suggest good hymns for you to pick for future church services. That’s not all. YHM can help you analyse how frequently your choir has sung any hymn, helping you gain insights about if and how well they know certain hymns.

Here’s the thing, whatever technique you choose to keep records of hymns, it’s very important to store the hymn details diligently. This requires discipline. If your church has service on multiple days of the week, it’s necessary to keep track of the hymns chosen for all service days, not just for Sundays alone. That way, the book or hymn planning software can provide maximum insight and support to the people who choose hymns.

So, there we are. We have discussed various techniques for keeping good records of hymns chosen for church service and why it’s important to keep good records of hymns. Till next time, happy hymns management.

Why you should master tonic sol-fa today as a choir singer or instrumentalist

Posted on: May 26th, 2026 by Olu No Comments

Hi Folks,

I remember sitting with a few choristers at choir practice one sunny afternoon a while ago. We were talking about tonic sol-fa when an esteemed chorister made a striking comment. She said that when she looked at tonic sol-fa, all she saw was a bunch of notes, so she wasn’t too sure how to make use of it. I gave a brief answer then but feel it would be great to use this medium to explore the topic in greater depth. So, why should you, as a choir singer or instrumentalist, learn and use tonic sol-fa? Here are 5 reasons.

1. Tonic sol-fa can come to the rescue when you need to quickly remember the melody of a song you once learnt but have forgotten. Believe me when I tell you that this situation happens more often than you may think. What causes us to sometimes forget the melody of a song we know? One possible reason is if we only learnt the song recently and haven’t practised it enough so that it is saved in our long-term memory. Another reason is if it has been ages since we sang a song. In either situation, a quick look at the tonic sol-fa is often helpful in bringing the song back to mind.

2. Tonic sol-fa helps you to know the melody of brand-new songs you have never encountered before. Truly, when I pick up my CCC hymnbook, I can often go to an unfamiliar hymn and, just by reading the tonic sol-fa alone, get a good idea of how the song would sound even though I’ve never listened to a recording of it. In fact, when I notice that the song’s progression is very similar to that of another song I already know, I may even be able to also determine the rhythm of the new song. This makes it so much easier to sing or play new hymns on musical instruments.

3. Tonic sol-fa makes it easier to compose music using just a pen and paper – you can write both words and tonic solfa and not need to worry about how to record your voice right away. This can come in handy if you find yourself in a situation where it may be awkward or even impossible to record your voice.

4. Toni sol-fa makes it easier and quicker to learn new complex songs as you listen to them. It does this by giving you a second way to absorb the new song i.e. you use your ears to listen to the song as the first mode, then use the tonic sol-fa as a secondary way to understand the songs more deeply. Think of it this way… You know how in large supermarkets there may be only one cashier register active and after some time the queue of customers waiting to check out starts getting long, then suddenly, a second cashier register is activated, and the queue moves faster and customers feel happier? That’s how it is when you know your tonic sol-fa. It’s like having an extra cashier register to handle the flow of new musical information.

5. Tonic sol-fa allows you develop relative pitch by training your ears to understand how different notes sound when compared to the key of a song (the home key). This makes it easier to sing songs in any key.

As you can see, tonic sol-fa is pretty important and useful to singers and instrumentalists. That’s why YHM provides clean tonic sol-fa of CCC Hymns and includes a dedicated tonic sol-fa section you can use when creating your own hymns.

So, how can you master tonic sol-fa?

First, read about tonic sol-fa. Yinkos Tutorial has an insightful article on tonic sol-fa you can read. You can also find other useful articles about it on the internet.

What else can you do? Learn tonic sol-fa for songs you already know. E.g. Check your hymnbook for familiar songs and learn their tonic sol-fa. If you’re a fan of CCC music, then check out the CCC Hymnbook New Revised Standard Edition which has Yoruba hymns and tonic sol-fa. You can also use YHM which shows tonic sol-fa for both English and Yoruba hymns.

Finally, you can take things a step further by writing tonic sol-fa for new songs you come across or when creating new songs.

With some practice and dedication, you can become very skilled at using tonic sol-fa to take your music knowledge and singing skill to the next level. Till next time, happy singing.

Major Improvements to CCC Hymn Lyrics in YHM

Posted on: May 25th, 2026 by Olu No Comments

Hi Folks,

We’re pleased to announce major improvements to the CCC lyrics and tonic sol-fa available in Yinkos Hymns Manager (YHM).

Yoruba – The Yoruba hymns lyrics and tonic sol-fa have been updated to match the CCC Hymns New Revised Standard Edition. But that’s not all. We also fix some obvious typographical errors and present the lyrics in a clean, consistent format to allow for smoother reading.

English – The English hymns lyrics have been updated to match the CCC English Hymns CET (Contextualized English Translations). As usual, we include tonic sol-fa to make it easier to read the music visually.

We hope these changes would make it easier to not just manage hymns selection, but learn, enjoy, and meditate on CCC hymns wherever you are. Check out these new improved lyrics on YHM. We welcome feedback. If you have any questions or comments, please contact us.

Happy hymns management.

5 Powerful techniques to improve how you practice to become a better choir singer

Posted on: May 23rd, 2026 by Olu No Comments

Hi Choir Singers,

Would you like to become a better singer faster? Would you like to get more value from your choir practice sessions? Then look no further. In this post, I’ll give you 5 straight-to-the-point no-nonsense tips to supercharge your practice and improve your singing skills based on my research and experience as a choir singer and instrumentalist.

 

1. Practice good singing consistently
Sing every day using good technique. Why? Because the more you sing, the better you’ll get – that’s just how nature works. Like the saying goes, practice makes perfect. So, find and use every opportunity you can to sing. Do not wait until you get to choir practice or until church service to sing.  Good opportunities for singing could be while driving, while running, while dog walking, etc. Just make sure you’re practicing every day. To expand your skill further, you can use apps like YouTube or Yinkos Hymns Manager (YHM) to discover new hymns, listen to hymn recordings, and sing along. Good techniques to use include things like breathing into your diaphragm, standing straight or sitting straight, being relaxed, avoiding strain on your vocal cords, and using your natural resonance.

 

2. Attend choir practice regularly
When you signed up to join the choir you knew exactly what day of the week and what time choir practice would take place.
So make sure you block the time out and attend choir practice diligently. Try your best to reschedule other social engagements outside of choir practice time.

Why is it important to attend choir practice regularly? Because this is one of your fastest paths to developing your musical skills and this helps your choir to develop quicker too.

If you say you will go for practice, then make sure you show up. Be reliable and have integrity.
Good choir singing requires good practice, so if you don’t go for rehearsals, it holds back both the choir and your own self-improvement.

Also, don’t just attend choir practice, but do your best to be arrive on time. Be punctual. This helps to show your commitment, motivates others to stay committed as well, fosters good team spirit, and helps you build a valuable life skill that will help you in other areas of life, e.g. work, family relationships, etc.

 

3. Memorize the tonic sol-fa or sheet music and lyrics as soon as you can 
This is crucial because it frees you up so you can watch the conductor, connect with your audience and truly tell the story through music during performances or service. It’s very difficult to do these if you’re staring at a piece of paper searching for words.
Also, when you have memorized all parts of the music in time, you would be able to perfect the song faster and more easily during choir practice. You’ll have more time to learn higher-level skills like harmonizing with other choristers, learning advanced singing techniques, etc. In short, you will develop quicker.
What can you do to make it easier to memorize hymns? Try to buy a version of your hymnbook that has tonic sol-fa or sheet music and use it for studying songs. Listen to correct versions of songs – this is especially important for songs that have multiple versions. Also you can try to find mobile apps for your church that includes words and tonic sol-fa/sheet music to allow you study on the go. For CCC, an example of such app is YHM.

 

4. Sing the correct notes
It’s not enough to just memorize the right notes, but you must practice singing the right notes thoroughly at home, so you are well prepared and confident during choir practice and during live service /performances. To help with this, make sure you pay attention to the tonic sol-fa or sheet music and audio recording. Also, a good tip is to record yourself using your phone when you sing and then play it back so you can compare it with the original version and critique your performance honestly. If you find flaws, go back and practice the faulty areas so that you improve.

 

5. Sing the correct words
When you learn a song, it’s important to not just memorise the words, but practice singing the right words rigorously. Why is it important to sing the right words? Because it makes it easier for you to connect with the message of the song, sing with the right emotions, and connect with your audience. What are some ways to master the right words? Write them down, read them, act them, and get them fully embedded in your mind as soon as possible. In churches like CCC where people sing songs in multiple languages routinely, you may have to sing songs in a language you don’t speak fluently. In such cases, take extra time to find out and understand the meaning of each word in the song. You can do this by reading the translation of the song in a more familiar language or by asking your peers or choir master if in doubt.

Again, if you attend multilingual churches, it would be helpful for you to have access to your church hymnbook in all relevant languages. How? You can buy the hymnbook in all relevant languages, or use apps e.g. For CCC, some good apps are CCC Hymns CET and YHM which gives you access to hymns in multiple languages.

In conclusion, we have explored some techniques to improve your singing and get more value from your choir practice sessions. Keep practicing, keep growing, and happy singing.

Stand-up summaries – an excellent tool to boost productivity in Agile software development teams

Posted on: February 14th, 2026 by Olu No Comments

Hi Folks,

In this post I discuss a great tool for keeping software development teams accountable. It’s called the Stand-up summary.

How does it work?

In teams that adopt Agile methodology, it’s common to have daily stand-up meetings where developers discuss what they have worked on, what they plan to work on, etc.
A stand-up summary is a short summary of the action points for each member (usually software developers) in the team, saying what they plan to work on that day.

This summary can be written by the facilitator for the meeting and posted onto a shared location, easily accessible by all members of the team, e.g. the team group chat (think of MS Teams, Slack, etc.), shortly after the meeting ends.

What are the advantages of using stand-up summaries?

  • It helps to keep each team member focused on their goals for the day and minimise distractions.
  • It gives visibility to the rest of the team so that the team leader can more easily help each member to make sure the entire team meets its goals.
  • It helps gives visibility of the team’s daily goals to other stakeholders who may not necessarily be the software developers themselves.
  • It helps keep each team member accountable. Knowing that one’s goals has been posted on to the team group chat motivates one to strive to fulfil the goals promptly.

That’s all for now. Till next time, happy software development.

Yinkos Flashcards is launched

Posted on: September 30th, 2025 by Olu No Comments

Hi Folks,

We’re pleased to announce the launch our latest web application called Yinkos Flashcards.

Yinkos Flashcards is an application designed to help you master concepts faster using Spaced Repetition, an evidence-based learning technique that is usually performed with flashcards.

Yinkos Flashcards provides a number of very useful features:

  • Browse flashcards – Find quality flashcards in various subjects including Music and Yoruba.
  • Create flashcards to help you learn any subject or topic quickly.
  • Use Spaced Repetition to improve memory and learn effectively.

You can use Yinkos Flashcards on any device that has a web browser, be it on a desktop, laptop, mobile phone or tablet.

To access the app, visit https://flashcards.yinkos.com/.

As always, we like to know what you think about the game. Feel free to contact us.

Enjoy.

How to patch in a fixture with Pytest

Posted on: June 5th, 2025 by Olu No Comments

Hi Folks,

In this post I cover a tip to help you write automated tests easily in Python. Specifically I talk about a simple way to apply a patch to multiple test cases without having to manually specify it in each test case. I will assume you’re using the Pytest as your testing framework.

A way to do this is to do the patching in a fixtures.

For example, you can add code as follows to your conftest.py, or wherever you define your fixture:

import pytest
from unittest.mock import patch


@pytest.fixture(autouse=True)
def no_delay():
    with patch('ConstantsModule.ConstantsClass.DELAY_TIME', 10):
        yield

This way, when you want to apply the mock in a test case, all you have to do is add no_delay as an argument to the function.

That’s all for now. Till next time, happy testing.

 

Reference

python – py.test patch on fixture – Stack Overflow. https://stackoverflow.com/questions/50048080/py-test-patch-on-fixture

How to access Shared Directories on Operating Systems that support SMB protocol using SMBLibrary

Posted on: April 27th, 2025 by Olu No Comments

Hi Folks,

In this post we will briefly cover how to access files in shared directories on operating systems that support SMB protocol.

First, what’s SMB? SMB means Server Message Block. It is a communication protocol used to share files, printers, serial ports and miscellaneous cmomunications between nodes on a network.  SMB was originally developed at IBM and is widely supported in Windows mac OS and Linux.

In this post we will assume you’re programming in C#. Also, we will assume the

A good library for accessing shared drive is SMBLibrary https://github.com/TalAloni/SMBLibrary.

Checking a file exists

The procedure involves creating an instance of SMB2Client, connecting to the share server, logging in, creating a file store using TreeConnect method, and using it to look through the files on the shared directory to see if your desired file exists.

Here’s some sample code you can use for checking if a file exists in a given directory, using SMBLibrary.

string Fullpath = @"\\server\sharename\inner-path\inner-path2\";
var parts = Fullpath.Split('\\');
ShareName = parts[1]
PathPrefixInShare = $@"\\{parts[0]}\{ShareName}\";

Boolean exists(string directory, string file) {

    var result = false;
    var client = SMB2Client();
    string error = null;
    bool isConnected = client.Connect(IPAddress.Parse("sharehostname", SMBTransportType.DirectTCPTransport);

    if (isConnected) {
        NTStatus status = client.Login(String.Empty, "someusername", "somepassword")

        if (status == NTStatus.STATUS_SUCCESS) {
            ISMBFileStore fileStore = client.TreeConnect(ShareName, out status);

            object fileHandle;
            object directoryHandle;
            FileStatus fileStatus;

            if (fileStore is SMB2FileStore) {
                directory = directory.Replace(PathPrefixInShare, "");

                status = fileStore.CreateFile(out directoryHandle, out fileStatus, directory, AccessMask.GENERIC_READ, SMBLibrary.Fileattributes.Directory, ShareAccess.Read | ShareAccess.Write, CreateDisposition.FILE_OPEN, CreateOptions.FILE_DIRECTORY_FILE, null);

                if (status == NTStatus.STATUS_SUCCESS) {

                    List fileList;
                    status = fileStore.QueryDirectory(out fileList, directoryHandle, "*", FileInformationClass.FileDirectoryInformation);
                    status = fileStore.CloseFile(directoryHandle);

                    foreach(FileDirectoryInformation aFile in fileList) {
                        if (aFile.FileName == file) {
                            result = true;
                            break;
                        }
                    }
                }
                status = fileStore.Disconnect();
            } else {
                error = "There was an error accessing data";
            }
            client.Logoff();

        }
        client.Disconnect();
    }

    if (error != null) {
        throw new Exception(error);
    }
    return results;

}

 

Reading a file

The procedure involves creating an instance of SMB2Client, connecting to the share server, logging in, creating a file store using TreeConnect method, then get the inner filepath by stripping parent directories, create a file handle, by calling CreateFile method on the file store, then reading the data (bytes) from the file by calling ReadFile method on the file store.

And here is some sample code for fetching the data in a given file path within a shared drive using SMBLibrary

MemoryStream getTheFileStream(string filePath) {
    MemoryStream stream = new MemoryStream();

    var client = SMB2Client();
    string error = null;
    bool isConnected = client.Connect(IPAddress.Parse("someurl", SMBTransportType.DirectTCPTransport);

    if (isConnected) {
        NTStatus status = client.Login(String.Empty, "someuser", "somepassword")

        if (status == NTStatus.STATUS_SUCCESS) {
            ISMBFileStore fileStore = client.TreeConnect(ShareName, out status);

            object fileHandle;
            FileStatus fileStatus;

            if (fileStore is SMB2FileStore) {
                filePath = filePath.Replace(PathPrefixInShare, "");

                status = fileStore.CreateFile(out fileHandle, out fileStatus, filePath, AccessMask.GENERIC_READ | AccessMask.SYNCHRONIZE, SMBLibrary.Fileattributes.Normal, ShareAccess.Read, CreateDisposition.FILE_OPEN, CreateOptions.FILE_NON_DIRECTORY_FILE | CreateOptions.FILE_SYNCHRONOUS_IO_ALERT, null);

                if (status == NTStatus.STATUS_SUCCESS) {
                    byte[] data;
                    long bytesRead = 0;

                    while (true) {

                        status = fileStore.ReadFile(out data, fileHandle, bytesRead, (int)client.MaxReadSize);
                        if (status != NTStatus.STATUS_SUCCESS && status != NTStatus.STATUS_END_OF_FILE) {
                            throw new Exception("failed to read from file");

                        }

                        if (status == NTStatus.STATUS_END_OF_FILE || data.Length == 0) {
                            break;
                        }

                        bytesRead += data.Length;
                        stream.Write(data, 0, data.Length);
                    }

                }
                status = fileStore.CloseFile(fileHandle);
                status = fileStore.Disconnect();
            } else {
                error = "There was an error accessing data";
            }
            client.Logoff();

        }
        client.Disconnect();
    }

    if (error != null) {
        throw new Exception(error);
    }

    stream.Seek(0, SeekOrigin.Begin);
    return stream;

}

That’s all for now. Till next time, happy software development.