user2582: I want to write a program that gets a block header from the Litecoin client and increments the nonce until it finds a valid block. How do I do that?
C# is preferred however C, C++, python will do.

user2306: 
I'm looking for a library that gives me mining functionality

I would suggest Bitcoin.NET. It can make an RPC connection to your Litecoin/Bitcoin client and ask for a block header to work on.

Is it compatible with Litecoin

Bitcoin and Litecoin share a lot of code, including Remote Procedure Call, which is what Bitcoin.NET uses to talk to your *coin client. Note that the RPC port for Litecoin is 9332 instead of 8332, though.

How do I write a mining client with this?

Take the block header getwork gives you and hash it like so. Compare it to your target.

2582: <p>I want to write a program that gets a block header from the Litecoin client and increments the nonce until it finds a valid block. How do I do that?</p>

<p>C# is preferred however C, C++, python will do.</p>
 2306: <blockquote>
  <p>I'm looking for a library that gives me mining functionality</p>
</blockquote>

<p>I would suggest <a href="https://github.com/mb300sd/Bitcoin.NET" rel="nofollow">Bitcoin.NET</a>. It can make an RPC connection to your Litecoin/Bitcoin client and ask for a block header to work on.</p>

<blockquote>
  <p>Is it compatible with Litecoin</p>
</blockquote>

<p>Bitcoin and Litecoin share a lot of code, including Remote Procedure Call, which is what Bitcoin.NET uses to talk to your *coin client. Note that the RPC port for Litecoin is 9332 instead of 8332, though.</p>

<blockquote>
  <p>How do I write a mining client with this?</p>
</blockquote>

<p>Take the block header <a href="https://en.bitcoin.it/wiki/Getwork" rel="nofollow">getwork</a> gives you and hash it <a href="https://github.com/litecoin-project/litecoin/wiki/Scrypt-proof-of-work" rel="nofollow">like so</a>. Compare it to your target.</p>
